Changeset 209218 in webkit


Ignore:
Timestamp:
Dec 1, 2016 2:55:40 PM (7 years ago)
Author:
matthew_hanson@apple.com
Message:

Merge r209149. rdar://problem/29404230

Location:
branches/safari-602-branch
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602-branch/LayoutTests/ChangeLog

    r209211 r209218  
     12016-12-01  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r209149. rdar://problem/29404230
     4
     5    2016-11-30  Mark Lam  <mark.lam@apple.com>
     6
     7            Proxy is not allowed in the global prototype chain.
     8            https://bugs.webkit.org/show_bug.cgi?id=165205
     9
     10            Reviewed by Geoffrey Garen.
     11
     12            * js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt: Added.
     13            * js/dom/proxy-is-not-allowed-in-global-prototype-chain.html: Added.
     14
    1152016-12-01  Matthew Hanson  <matthew_hanson@apple.com>
    216
  • branches/safari-602-branch/Source/JavaScriptCore/ChangeLog

    r208622 r209218  
     12016-12-01  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Merge r209149. rdar://problem/29404230
     4
     5    2016-11-30  Mark Lam  <mark.lam@apple.com>
     6
     7            Proxy is not allowed in the global prototype chain.
     8            https://bugs.webkit.org/show_bug.cgi?id=165205
     9
     10            Reviewed by Geoffrey Garen.
     11
     12            * runtime/ProgramExecutable.cpp:
     13            (JSC::ProgramExecutable::initializeGlobalProperties):
     14            - We'll now throw a TypeError if we detect a Proxy in the global prototype chain.
     15
    1162016-11-11  Matthew Hanson  <matthew_hanson@apple.com>
    217
  • branches/safari-602-branch/Source/JavaScriptCore/runtime/Executable.cpp

    r202734 r209218  
    585585    ASSERT(&globalObject->vm() == &vm);
    586586
     587    JSValue nextPrototype = globalObject->getPrototypeDirect();
     588    while (nextPrototype && nextPrototype.isObject()) {
     589        if (UNLIKELY(asObject(nextPrototype)->type() == ProxyObjectType)) {
     590            ExecState* exec = globalObject->globalExec();
     591            return createTypeError(exec, ASCIILiteral("Proxy is not allowed in the global prototype chain."));
     592        }
     593        nextPrototype = asObject(nextPrototype)->getPrototypeDirect();
     594    }
     595
    587596    JSObject* exception = 0;
    588597    UnlinkedProgramCodeBlock* unlinkedCodeBlock = globalObject->createProgramCodeBlock(callFrame, this, &exception);
     
    676685        }
    677686    }
    678     return 0;
     687    return nullptr;
    679688}
    680689
Note: See TracChangeset for help on using the changeset viewer.