Changeset 163595 in webkit
- Timestamp:
- Feb 6, 2014, 6:03:26 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSContextRef.cpp
r160099 r163595 58 58 { 59 59 initializeThreading(); 60 return toRef(VM::createContextGroup().leakRef()); 60 VM* vm = VM::createContextGroup().leakRef(); 61 vm->ignoreStackLimit(); 62 return toRef(vm); 61 63 } 62 64 … … 130 132 initializeThreading(); 131 133 132 RefPtr<VM> vm = group ? PassRefPtr<VM>(toJS(group)) : VM::createContextGroup(); 134 RefPtr<VM> vm; 135 if (group) 136 vm = PassRefPtr<VM>(toJS(group)); 137 else { 138 vm = VM::createContextGroup(); 139 vm->ignoreStackLimit(); 140 } 133 141 134 142 APIEntryShim entryShim(vm.get(), false); -
trunk/Source/JavaScriptCore/API/tests/testapi.js
r148162 r163595 243 243 244 244 shouldBe("undefined instanceof MyObject", false); 245 /* 245 246 EvilExceptionObject.hasInstance = function f() { return f(); }; 246 247 EvilExceptionObject.__proto__ = undefined; … … 253 254 EvilExceptionObject.toStringExplicit = function f() { return f(); } 254 255 shouldThrow("String(EvilExceptionObject)"); 256 */ 255 257 256 258 shouldBe("EmptyObject", "[object CallbackObject]"); -
trunk/Source/JavaScriptCore/ChangeLog
r163590 r163595 1 2014-02-06 Michael Saboff <msaboff@apple.com> 2 3 Workaround REGRESSION(r163195-r163227): Crash beneath NSErrorUserInfoFromJSException when installing AppleInternal.mpkg 4 https://bugs.webkit.org/show_bug.cgi?id=128347 5 6 Reviewed by Geoffrey Garen. 7 8 Added a flag to VM class called m_ignoreStackLimit that disables stack limit checks. 9 We set this flag in JSContextGroupCreate() and JSGlobalContextCreateInGroup(). 10 11 Disabled stack overflow tests in testapi.js since it uses these paths. 12 13 THis patch will be reverted as part of a comprehensive solution to the problem. 14 15 * API/JSContextRef.cpp: 16 (JSContextGroupCreate): 17 (JSGlobalContextCreateInGroup): 18 * API/tests/testapi.js: 19 * runtime/VM.cpp: 20 (JSC::VM::VM): 21 (JSC::VM::updateStackLimitWithReservedZoneSize): 22 * runtime/VM.h: 23 (JSC::VM::ignoreStackLimit): 24 1 25 2014-02-06 Mark Hahnenberg <mhahnenberg@apple.com> 2 26 -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r163428 r163595 220 220 , m_initializingObjectClass(0) 221 221 #endif 222 , m_ignoreStackLimit(false) 222 223 , m_stackLimit(0) 223 224 #if ENABLE(LLINT_C_LOOP) … … 739 740 size_t VM::updateStackLimitWithReservedZoneSize(size_t reservedZoneSize) 740 741 { 742 if (m_ignoreStackLimit) { 743 setStackLimit(0); 744 return 0; 745 } 746 741 747 size_t oldReservedZoneSize = m_reservedZoneSize; 742 748 m_reservedZoneSize = reservedZoneSize; -
trunk/Source/JavaScriptCore/runtime/VM.h
r163225 r163595 388 388 void* stackLimit() { return m_stackLimit; } 389 389 390 void ignoreStackLimit() { m_ignoreStackLimit = true; } 391 390 392 bool isSafeToRecurse(size_t neededStackInBytes = 0) const 391 393 { … … 522 524 const ClassInfo* m_initializingObjectClass; 523 525 #endif 526 bool m_ignoreStackLimit; 524 527 size_t m_reservedZoneSize; 525 528 #if ENABLE(LLINT_C_LOOP)
Note:
See TracChangeset
for help on using the changeset viewer.