Ignore:
Timestamp:
Dec 6, 2015, 5:54:43 PM (10 years ago)
Author:
[email protected]
Message:

REGRESSION(r193584): Causes heap use-after-free crashes in Web Inspector tests with AddressSanitizer (Requested by ddkilzer on #webkit).
https://bugs.webkit.org/show_bug.cgi?id=151929

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/193584

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLOperations.cpp

    r193584 r193606  
    165165        FunctionExecutable* executable = nullptr;
    166166        JSScope* activation = nullptr;
     167        JSValue boundThis;
     168        bool isArrowFunction = false;
    167169        for (unsigned i = materialization->properties().size(); i--;) {
    168170            const ExitPropertyValue& property = materialization->properties()[i];
     
    171173            if (property.location() == PromotedLocationDescriptor(FunctionActivationPLoc))
    172174                activation = jsCast<JSScope*>(JSValue::decode(values[i]));
     175            if (property.location() == PromotedLocationDescriptor(ArrowFunctionBoundThisPLoc)) {
     176                isArrowFunction = true;
     177                boundThis = JSValue::decode(values[i]);
     178            }
    173179        }
    174180        RELEASE_ASSERT(executable && activation);
    175181
    176182       
    177         JSFunction* result = JSFunction::createWithInvalidatedReallocationWatchpoint(vm, executable, activation);
     183        JSFunction* result = isArrowFunction
     184            ? JSArrowFunction::createWithInvalidatedReallocationWatchpoint(vm, executable, activation, boundThis)
     185            : JSFunction::createWithInvalidatedReallocationWatchpoint(vm, executable, activation);
    178186
    179187        return result;
Note: See TracChangeset for help on using the changeset viewer.