Ignore:
Timestamp:
Jan 18, 2011, 6:37:59 PM (14 years ago)
Author:
[email protected]
Message:

2011-01-18 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

[jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
https://bugs.webkit.org/show_bug.cgi?id=52690

Add a few more tests.

  • fast/js/function-dot-arguments-expected.txt:
  • fast/js/script-tests/function-dot-arguments.js: (overwroteArgumentsInDynamicScope1): (overwroteArgumentsInDynamicScope2): (overwroteArgumentsInDynamicScope3):

2011-01-18 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

[jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
https://bugs.webkit.org/show_bug.cgi?id=52690

Clean up code to retrieve arguments from activation and function objects.
Remove the incorrect assertion from JSActivation's argumentsGetter.

  • interpreter/Interpreter.cpp: (JSC::Interpreter::retrieveArguments):
  • runtime/JSActivation.cpp: (JSC::JSActivation::argumentsGetter):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r75443 r76090  
    48034803        ASSERT(codeBlock->codeType() == FunctionCode);
    48044804        int argumentsRegister = codeBlock->argumentsRegister();
    4805         if (!functionCallFrame->r(argumentsRegister).jsValue()) {
    4806             JSValue arguments = JSValue(new (callFrame) Arguments(functionCallFrame));
    4807             functionCallFrame->r(argumentsRegister) = arguments;
    4808             functionCallFrame->r(unmodifiedArgumentsRegister(argumentsRegister)) = arguments;
    4809         }
    4810         return functionCallFrame->r(argumentsRegister).jsValue();
     4805        int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister);
     4806        if (JSValue arguments = functionCallFrame->uncheckedR(argumentsRegister).jsValue())
     4807            return arguments;
     4808        JSValue arguments = JSValue(new (callFrame) Arguments(functionCallFrame));
     4809        functionCallFrame->r(argumentsRegister) = arguments;
     4810        functionCallFrame->r(realArgumentsRegister) = arguments;
     4811        return arguments;
    48114812    }
    48124813
Note: See TracChangeset for help on using the changeset viewer.