Changeset 163664 in webkit


Ignore:
Timestamp:
Feb 7, 2014 4:46:28 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Revert workaround committed in http://trac.webkit.org/r163595.
<https://webkit.org/b/128408>

Reviewed by Geoffrey Garen.

Now that we have fixed the bugs in JSLock's stack limit adjusments
in https://bugs.webkit.org/show_bug.cgi?id=128406, we can revert the
workaround in r163595.

  • API/JSContextRef.cpp:

(JSContextGroupCreate):
(JSGlobalContextCreateInGroup):

  • API/tests/testapi.js:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::updateStackLimitWithReservedZoneSize):

  • runtime/VM.h:
Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSContextRef.cpp

    r163595 r163664  
    5858{
    5959    initializeThreading();
    60     VM* vm = VM::createContextGroup().leakRef();
    61     vm->ignoreStackLimit();
    62     return toRef(vm);
     60    return toRef(VM::createContextGroup().leakRef());
    6361}
    6462
     
    132130    initializeThreading();
    133131
    134     RefPtr<VM> vm;
    135     if (group)
    136         vm = PassRefPtr<VM>(toJS(group));
    137     else {
    138         vm = VM::createContextGroup();
    139         vm->ignoreStackLimit();
    140     }
     132    RefPtr<VM> vm = group ? PassRefPtr<VM>(toJS(group)) : VM::createContextGroup();
    141133
    142134    APIEntryShim entryShim(vm.get(), false);
  • trunk/Source/JavaScriptCore/API/tests/testapi.js

    r163595 r163664  
    243243
    244244shouldBe("undefined instanceof MyObject", false);
    245 /*
    246245EvilExceptionObject.hasInstance = function f() { return f(); };
    247246EvilExceptionObject.__proto__ = undefined;
     
    254253EvilExceptionObject.toStringExplicit = function f() { return f(); }
    255254shouldThrow("String(EvilExceptionObject)");
    256  */
    257255
    258256shouldBe("EmptyObject", "[object CallbackObject]");
  • trunk/Source/JavaScriptCore/ChangeLog

    r163661 r163664  
     12014-02-07  Mark Lam  <mark.lam@apple.com>
     2
     3        Revert workaround committed in http://trac.webkit.org/r163595.
     4        <https://webkit.org/b/128408>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Now that we have fixed the bugs in JSLock's stack limit adjusments
     9        in https://bugs.webkit.org/show_bug.cgi?id=128406, we can revert the
     10        workaround in r163595.
     11
     12        * API/JSContextRef.cpp:
     13        (JSContextGroupCreate):
     14        (JSGlobalContextCreateInGroup):
     15        * API/tests/testapi.js:
     16        * runtime/VM.cpp:
     17        (JSC::VM::VM):
     18        (JSC::VM::updateStackLimitWithReservedZoneSize):
     19        * runtime/VM.h:
     20
    1212014-02-07  Mark Lam  <mark.lam@apple.com>
    222
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r163595 r163664  
    220220    , m_initializingObjectClass(0)
    221221#endif
    222     , m_ignoreStackLimit(false)
    223222    , m_stackLimit(0)
    224223#if ENABLE(LLINT_C_LOOP)
     
    740739size_t VM::updateStackLimitWithReservedZoneSize(size_t reservedZoneSize)
    741740{
    742     if (m_ignoreStackLimit) {
    743         setStackLimit(0);
    744         return 0;
    745     }
    746 
    747741    size_t oldReservedZoneSize = m_reservedZoneSize;
    748742    m_reservedZoneSize = reservedZoneSize;
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r163595 r163664  
    388388        void* stackLimit() { return m_stackLimit; }
    389389
    390         void ignoreStackLimit() { m_ignoreStackLimit = true; }
    391 
    392390        bool isSafeToRecurse(size_t neededStackInBytes = 0) const
    393391        {
     
    524522        const ClassInfo* m_initializingObjectClass;
    525523#endif
    526         bool m_ignoreStackLimit;
    527524        size_t m_reservedZoneSize;
    528525#if ENABLE(LLINT_C_LOOP)
Note: See TracChangeset for help on using the changeset viewer.