Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Failing unwrapped scripts are executed twice

#9

For backward compatibility purposes, following script wrapping mess in previous GM releases, we're left with the following code:


      if (!script.unwrap)
        scriptSrc = "(function(){"+ scriptSrc +"})()";
      if (!this.evalInSandbox(scriptSrc, url, sandbox, script) && script.unwrap)
        this.evalInSandbox("(function(){"+ scriptSrc +"})()",
                           url, sandbox, script); // wrap anyway on early return

In other words, if an unwrapped script fails to execute properly, it is wrapped and executed again. This might result in a page being (at least partly) modified twice.

Scripts failing because of @unwrap issues should be fixed, not "hot-patched" like this.

Reported by Olivier Cornu · March 23rd, 2009 @ 02:39 PM

State: resolved
Milestone: 0.1a1
Assigned to: Olivier Cornu Olivier Cornu

Activity

  1. Olivier Cornu
    Olivier Cornu
    • State changed from new to resolved

    (from [5dfd6fc9fcc60b23084c59007bebcf7462c2e853]) Don't execute failing unwrapped scripts twice [#9 Failing unwrapped scripts are executed twice state:resolved] http://github.com/ocornu/webmonk...

    March 24th, 2009 @ 11:36 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.