Ignore:
Timestamp:
Sep 13, 2007, 7:50:22 AM (18 years ago)
Author:
antti
Message:

JavaScriptCore:

Reviewed by Maciej.


Small addition to previous path to cover
http://bugs.webkit.org/show_bug.cgi?id=11399
window.eval runs in the global scope of the calling window


Switch variable scope as well.

  • kjs/function.cpp: (KJS::GlobalFuncImp::callAsFunction):

LayoutTests:

Reviewed by Maciej.


Change test case to cover
http://bugs.webkit.org/show_bug.cgi?id=11399
too.

  • fast/js/window-eval-context-expected.txt:
  • fast/js/window-eval-context.html:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.cpp

    r25534 r25535  
    834834        ctx.setExecState(&newExec);
    835835         
    836         if (switchGlobal)
     836        if (switchGlobal) {
    837837            ctx.pushScope(thisObj);
     838            ctx.setVariableObject(thisObj);
     839        }
    838840       
    839841        // execute the code
Note: See TracChangeset for help on using the changeset viewer.