Changeset 197794 in webkit
- Timestamp:
- Mar 8, 2016, 12:57:25 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 deleted
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/CMakeLists.txt ¶
r197781 r197794 710 710 runtime/JSModuleRecord.cpp 711 711 runtime/JSNativeStdFunction.cpp 712 runtime/JSNotAnObject.cpp713 712 runtime/JSONObject.cpp 714 713 runtime/JSObject.cpp -
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r197793 r197794 1 2016-03-08 Mark Lam <mark.lam@apple.com> 2 3 synthesizePrototype() and friends need to be followed by exception checks (or equivalent). 4 https://bugs.webkit.org/show_bug.cgi?id=155169 5 6 Reviewed by Geoffrey Garen. 7 8 With the exception checks, we may end up throwing new exceptions over an existing 9 one that has been thrown but not handled yet, thereby obscuring it. It may also 10 mean that the VM will continue running on potentially unstable state, which may 11 have undesirable consequences. 12 13 I first observed this in some failed assertion while running tests on a patch for 14 https://bugs.webkit.org/show_bug.cgi?id=154865. 15 16 Performance is neutral with this patch (tested on x86_64). 17 18 1. Deleted JSNotAnObject, and removed all uses of it. 19 20 2. Added exception checks, when needed, following calls to synthesizePrototype() 21 and JSValue::toObject(). 22 23 The cases that do not need an exception check are the ones that already ensures 24 that JSValue::toObject() is only called on a value that is convertible to an 25 object. In those cases, I added an assertion that no exception was thrown 26 after the call. 27 28 * CMakeLists.txt: 29 * JavaScriptCore.xcodeproj/project.pbxproj: 30 * inspector/ScriptCallStackFactory.cpp: 31 (Inspector::createScriptCallStackFromException): 32 * interpreter/Interpreter.cpp: 33 * jit/JITOperations.cpp: 34 * llint/LLIntSlowPaths.cpp: 35 (JSC::LLInt::LLINT_SLOW_PATH_DECL): 36 * runtime/ArrayPrototype.cpp: 37 (JSC::arrayProtoFuncJoin): 38 (JSC::arrayProtoFuncConcat): 39 (JSC::arrayProtoFuncPop): 40 (JSC::arrayProtoFuncPush): 41 (JSC::arrayProtoFuncReverse): 42 (JSC::arrayProtoFuncShift): 43 (JSC::arrayProtoFuncSlice): 44 (JSC::arrayProtoFuncSplice): 45 (JSC::arrayProtoFuncUnShift): 46 (JSC::arrayProtoFuncIndexOf): 47 (JSC::arrayProtoFuncLastIndexOf): 48 (JSC::arrayProtoFuncValues): 49 (JSC::arrayProtoFuncEntries): 50 (JSC::arrayProtoFuncKeys): 51 * runtime/CommonSlowPaths.cpp: 52 (JSC::SLOW_PATH_DECL): 53 * runtime/ExceptionHelpers.cpp: 54 * runtime/JSCJSValue.cpp: 55 (JSC::JSValue::toObjectSlowCase): 56 (JSC::JSValue::toThisSlowCase): 57 (JSC::JSValue::synthesizePrototype): 58 (JSC::JSValue::putToPrimitive): 59 (JSC::JSValue::putToPrimitiveByIndex): 60 * runtime/JSCJSValueInlines.h: 61 (JSC::JSValue::getPropertySlot): 62 (JSC::JSValue::get): 63 * runtime/JSFunction.cpp: 64 * runtime/JSGlobalObjectFunctions.cpp: 65 (JSC::globalFuncProtoGetter): 66 * runtime/JSNotAnObject.cpp: Removed. 67 * runtime/JSNotAnObject.h: Removed. 68 * runtime/ObjectConstructor.cpp: 69 (JSC::objectConstructorDefineProperties): 70 (JSC::objectConstructorCreate): 71 * runtime/ObjectPrototype.cpp: 72 (JSC::objectProtoFuncValueOf): 73 (JSC::objectProtoFuncHasOwnProperty): 74 (JSC::objectProtoFuncIsPrototypeOf): 75 (JSC::objectProtoFuncToString): 76 * runtime/VM.cpp: 77 (JSC::VM::VM): 78 * runtime/VM.h: 79 1 80 2016-03-08 Oliver Hunt <oliver@apple.com> 2 81 -
TabularUnified trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj ¶
r197781 r197794 1688 1688 A72028B81797601E0098028C /* JSCTestRunnerUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = A72028B51797601E0098028C /* JSCTestRunnerUtils.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1689 1689 A72028BA1797603D0098028C /* JSFunctionInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A72028B91797603D0098028C /* JSFunctionInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1690 A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; };1691 1690 A72701B90DADE94900E548D7 /* ExceptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A72701B30DADE94900E548D7 /* ExceptionHelpers.h */; }; 1692 1691 A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3890 3889 A72028B51797601E0098028C /* JSCTestRunnerUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTestRunnerUtils.h; sourceTree = "<group>"; }; 3891 3890 A72028B91797603D0098028C /* JSFunctionInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFunctionInlines.h; sourceTree = "<group>"; }; 3892 A72700770DAC605600E548D7 /* JSNotAnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotAnObject.h; sourceTree = "<group>"; };3893 A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = "<group>"; };3894 3891 A72701B30DADE94900E548D7 /* ExceptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHelpers.h; sourceTree = "<group>"; }; 3895 3892 A729009B17976C6000317298 /* MacroAssemblerARMv7.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssemblerARMv7.cpp; sourceTree = "<group>"; }; … … 5736 5733 E33E8D1A1B9013C300346B52 /* JSNativeStdFunction.cpp */, 5737 5734 E33E8D1B1B9013C300346B52 /* JSNativeStdFunction.h */, 5738 A72700780DAC605600E548D7 /* JSNotAnObject.cpp */,5739 A72700770DAC605600E548D7 /* JSNotAnObject.h */,5740 5735 BC22A3980E16E14800AF21C8 /* JSObject.cpp */, 5741 5736 BC22A3990E16E14800AF21C8 /* JSObject.h */, … … 9088 9083 0FB387921BFD31A100E3AB1E /* FTLCompile.cpp in Sources */, 9089 9084 E33E8D1C1B9013C300346B52 /* JSNativeStdFunction.cpp in Sources */, 9090 A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */,9091 9085 147F39D4107EC37600427A48 /* JSObject.cpp in Sources */, 9092 9086 1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */, -
TabularUnified trunk/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp ¶
r190722 r197794 150 150 if (exception->value().isObject()) { 151 151 JSObject* exceptionObject = exception->value().toObject(exec); 152 ASSERT(exceptionObject); 152 153 int lineNumber; 153 154 int columnNumber; -
TabularUnified trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp ¶
r197614 r197794 49 49 #include "JSLexicalEnvironment.h" 50 50 #include "JSModuleEnvironment.h" 51 #include "JSNotAnObject.h"52 51 #include "JSStackInlines.h" 53 52 #include "JSString.h" -
TabularUnified trunk/Source/JavaScriptCore/jit/JITOperations.cpp ¶
r197648 r197794 1766 1766 1767 1767 JSObject* baseObj = JSValue::decode(encodedBase).toObject(exec); 1768 if (!baseObj) 1769 JSValue::encode(JSValue()); 1768 1770 bool couldDelete = baseObj->methodTable(vm)->deleteProperty(baseObj, exec, *identifier); 1769 1771 JSValue result = jsBoolean(couldDelete); … … 1806 1808 VM& vm = exec->vm(); 1807 1809 NativeCallFrameTracer tracer(&vm, exec); 1808 return JSValue::encode(JSValue::decode(value).toObject(exec)); 1810 JSObject* obj = JSValue::decode(value).toObject(exec); 1811 if (!obj) 1812 return JSValue::encode(JSValue()); 1813 return JSValue::encode(obj); 1809 1814 } 1810 1815 … … 2043 2048 2044 2049 JSObject* base = baseValue.toObject(exec); 2050 if (!base) 2051 return JSValue::encode(JSValue()); 2045 2052 return JSValue::encode(jsBoolean(base->hasPropertyGeneric(exec, asString(propertyName)->toIdentifier(exec), PropertySlot::InternalMethodType::GetOwnProperty))); 2046 2053 } -
TabularUnified trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp ¶
r197648 r197794 682 682 CodeBlock* codeBlock = exec->codeBlock(); 683 683 JSObject* baseObject = LLINT_OP_C(2).jsValue().toObject(exec); 684 LLINT_CHECK_EXCEPTION(); 684 685 bool couldDelete = baseObject->methodTable()->deleteProperty(baseObject, exec, codeBlock->identifier(pc[3].u.operand)); 685 686 LLINT_CHECK_EXCEPTION(); … … 799 800 JSValue baseValue = LLINT_OP_C(2).jsValue(); 800 801 JSObject* baseObject = baseValue.toObject(exec); 801 802 LLINT_CHECK_EXCEPTION(); 803 802 804 JSValue subscript = LLINT_OP_C(3).jsValue(); 803 805 -
TabularUnified trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp ¶
r197648 r197794 563 563 { 564 564 JSObject* thisObject = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 565 if (!thisObject) 566 return JSValue::encode(JSValue()); 565 567 566 568 StringRecursionChecker checker(exec, thisObject); … … 585 587 unsigned argCount = exec->argumentCount(); 586 588 JSValue curArg = thisValue.toObject(exec); 589 if (!curArg) 590 return JSValue::encode(JSValue()); 587 591 Checked<unsigned, RecordOverflow> finalArraySize = 0; 588 592 … … 631 635 632 636 curArg = thisValue.toObject(exec); 637 ASSERT(!exec->hadException()); 633 638 unsigned n = 0; 634 639 for (unsigned i = 0; ; ++i) { … … 666 671 667 672 JSObject* thisObj = thisValue.toObject(exec); 673 if (!thisObj) 674 return JSValue::encode(JSValue()); 668 675 unsigned length = getLength(exec, thisObj); 669 676 if (exec->hadException()) … … 698 705 699 706 JSObject* thisObj = thisValue.toObject(exec); 707 if (!thisObj) 708 return JSValue::encode(JSValue()); 700 709 unsigned length = getLength(exec, thisObj); 701 710 if (exec->hadException()) … … 723 732 { 724 733 JSObject* thisObject = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 734 if (!thisObject) 735 return JSValue::encode(JSValue()); 725 736 726 737 unsigned length = getLength(exec, thisObject); … … 796 807 { 797 808 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 809 if (!thisObj) 810 return JSValue::encode(JSValue()); 798 811 unsigned length = getLength(exec, thisObj); 799 812 if (exec->hadException()) … … 818 831 // http://developer.netscape.com/docs/manuals/js/client/jsref/array.htm#1193713 or 15.4.4.10 819 832 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 833 if (!thisObj) 834 return JSValue::encode(JSValue()); 820 835 unsigned length = getLength(exec, thisObj); 821 836 if (exec->hadException()) … … 860 875 861 876 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 877 if (!thisObj) 878 return JSValue::encode(JSValue()); 862 879 unsigned length = getLength(exec, thisObj); 863 880 if (exec->hadException()) … … 951 968 952 969 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 970 if (!thisObj) 971 return JSValue::encode(JSValue()); 953 972 unsigned length = getLength(exec, thisObj); 954 973 if (exec->hadException()) … … 975 994 // 15.4.4.14 976 995 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 996 if (!thisObj) 997 return JSValue::encode(JSValue()); 977 998 unsigned length = getLength(exec, thisObj); 978 999 if (exec->hadException()) … … 998 1019 // 15.4.4.15 999 1020 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 1021 if (!thisObj) 1022 return JSValue::encode(JSValue()); 1000 1023 unsigned length = getLength(exec, thisObj); 1001 1024 if (!length) … … 1033 1056 { 1034 1057 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 1058 if (!thisObj) 1059 return JSValue::encode(JSValue()); 1035 1060 return JSValue::encode(JSArrayIterator::create(exec, exec->callee()->globalObject()->arrayIteratorStructure(), ArrayIterateValue, thisObj)); 1036 1061 } … … 1039 1064 { 1040 1065 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 1066 if (!thisObj) 1067 return JSValue::encode(JSValue()); 1041 1068 return JSValue::encode(JSArrayIterator::create(exec, exec->callee()->globalObject()->arrayIteratorStructure(), ArrayIterateKeyValue, thisObj)); 1042 1069 } … … 1045 1072 { 1046 1073 JSObject* thisObj = exec->thisValue().toThis(exec, StrictMode).toObject(exec); 1074 if (!thisObj) 1075 return JSValue::encode(JSValue()); 1047 1076 return JSValue::encode(JSArrayIterator::create(exec, exec->callee()->globalObject()->arrayIteratorStructure(), ArrayIterateKey, thisObj)); 1048 1077 } -
TabularUnified trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp ¶
r197614 r197794 550 550 JSValue baseValue = OP_C(2).jsValue(); 551 551 JSObject* baseObject = baseValue.toObject(exec); 552 CHECK_EXCEPTION(); 552 553 553 554 JSValue subscript = OP_C(3).jsValue(); … … 607 608 BEGIN(); 608 609 JSObject* base = OP(2).jsValue().toObject(exec); 610 CHECK_EXCEPTION(); 609 611 JSValue property = OP(3).jsValue(); 610 612 pc[4].u.arrayProfile->observeStructure(base->structure(vm)); … … 617 619 BEGIN(); 618 620 JSObject* base = OP(2).jsValue().toObject(exec); 621 CHECK_EXCEPTION(); 619 622 JSValue property = OP(3).jsValue(); 620 623 ASSERT(property.isString()); … … 629 632 BEGIN(); 630 633 JSObject* base = OP(2).jsValue().toObject(exec); 634 CHECK_EXCEPTION(); 631 635 JSValue property = OP(3).jsValue(); 632 636 bool result; … … 657 661 658 662 JSObject* base = baseValue.toObject(exec); 663 CHECK_EXCEPTION(); 659 664 660 665 RETURN(propertyNameEnumerator(exec, base)); -
TabularUnified trunk/Source/JavaScriptCore/runtime/ExceptionHelpers.cpp ¶
r197614 r197794 35 35 #include "Exception.h" 36 36 #include "JSGlobalObjectFunctions.h" 37 #include "JSNotAnObject.h"38 37 #include "Interpreter.h" 39 38 #include "Nodes.h" -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp ¶
r197648 r197794 33 33 #include "JSFunction.h" 34 34 #include "JSGlobalObject.h" 35 #include "JSNotAnObject.h"36 35 #include "NumberObject.h" 37 36 #include "StructureInlines.h" … … 91 90 VM& vm = exec->vm(); 92 91 vm.throwException(exec, createNotAnObjectError(exec, *this)); 93 return JSNotAnObject::create(vm);92 return nullptr; 94 93 } 95 94 … … 126 125 VM& vm = exec->vm(); 127 126 vm.throwException(exec, createNotAnObjectError(exec, *this)); 128 return JSNotAnObject::create(vm);127 return nullptr; 129 128 } 130 129 … … 141 140 // Check if there are any setters or getters in the prototype chain 142 141 JSObject* obj = synthesizePrototype(exec); 142 if (UNLIKELY(!obj)) 143 return; 143 144 JSValue prototype; 144 145 if (propertyName != exec->propertyNames().underscoreProto) { … … 199 200 } 200 201 201 if (synthesizePrototype(exec)->attemptToInterceptPutByIndexOnHoleForPrototype(exec, *this, propertyName, value, shouldThrow)) 202 JSObject* prototype = synthesizePrototype(exec); 203 if (UNLIKELY(!prototype)) { 204 ASSERT(exec->hadException()); 205 return; 206 } 207 if (prototype->attemptToInterceptPutByIndexOnHoleForPrototype(exec, *this, propertyName, value, shouldThrow)) 202 208 return; 203 209 -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h ¶
r197614 r197794 768 768 return true; 769 769 object = synthesizePrototype(exec); 770 if (UNLIKELY(!object)) 771 return false; 770 772 } else 771 773 object = asObject(asCell()); … … 789 791 return slot.getValue(exec, propertyName); 790 792 object = synthesizePrototype(exec); 793 if (UNLIKELY(!object)) 794 return JSValue(); 791 795 } else 792 796 object = asObject(asCell()); -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSFunction.cpp ¶
r197614 r197794 40 40 #include "JSFunctionInlines.h" 41 41 #include "JSGlobalObject.h" 42 #include "JSNotAnObject.h"43 42 #include "Interpreter.h" 44 43 #include "ObjectConstructor.h" -
TabularUnified trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp ¶
r197648 r197794 822 822 JSObject* thisObject = jsDynamicCast<JSObject*>(exec->thisValue().toThis(exec, NotStrictMode)); 823 823 824 if (!thisObject) 825 return JSValue::encode(exec->thisValue().synthesizePrototype(exec)); 824 if (!thisObject) { 825 JSObject* prototype = exec->thisValue().synthesizePrototype(exec); 826 if (UNLIKELY(!prototype)) 827 return JSValue::encode(JSValue()); 828 return JSValue::encode(prototype); 829 } 826 830 827 831 GlobalFuncProtoGetterFunctor functor(exec, thisObject); -
TabularUnified trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp ¶
r197648 r197794 452 452 if (!exec->argument(0).isObject()) 453 453 return throwVMError(exec, createTypeError(exec, ASCIILiteral("Properties can only be defined on Objects."))); 454 return JSValue::encode(defineProperties(exec, asObject(exec->argument(0)), exec->argument(1).toObject(exec))); 454 JSObject* targetObj = asObject(exec->argument(0)); 455 JSObject* props = exec->argument(1).toObject(exec); 456 if (!props) 457 return JSValue::encode(JSValue()); 458 return JSValue::encode(defineProperties(exec, targetObj, props)); 455 459 } 456 460 -
TabularUnified trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp ¶
r197648 r197794 82 82 { 83 83 JSValue thisValue = exec->thisValue().toThis(exec, StrictMode); 84 return JSValue::encode(thisValue.toObject(exec)); 84 JSObject* valueObj = thisValue.toObject(exec); 85 if (!valueObj) 86 return JSValue::encode(JSValue()); 87 return JSValue::encode(valueObj); 85 88 } 86 89 … … 91 94 if (exec->hadException()) 92 95 return JSValue::encode(jsUndefined()); 93 return JSValue::encode(jsBoolean(thisValue.toObject(exec)->hasOwnProperty(exec, propertyName))); 96 JSObject* thisObject = thisValue.toObject(exec); 97 if (!thisObject) 98 return JSValue::encode(JSValue()); 99 return JSValue::encode(jsBoolean(thisObject->hasOwnProperty(exec, propertyName))); 94 100 } 95 101 … … 98 104 JSValue thisValue = exec->thisValue().toThis(exec, StrictMode); 99 105 JSObject* thisObj = thisValue.toObject(exec); 106 if (!thisObj) 107 return JSValue::encode(JSValue()); 100 108 101 109 if (!exec->argument(0).isObject()) … … 266 274 return JSValue::encode(thisValue.isUndefined() ? vm.smallStrings.undefinedObjectString() : vm.smallStrings.nullObjectString()); 267 275 JSObject* thisObject = thisValue.toObject(exec); 276 if (!thisObject) 277 return JSValue::encode(JSValue()); 268 278 269 279 JSString* result = thisObject->structure(vm)->objectToStringValue(); -
TabularUnified trunk/Source/JavaScriptCore/runtime/VM.cpp ¶
r197595 r197794 66 66 #include "JSLexicalEnvironment.h" 67 67 #include "JSLock.h" 68 #include "JSNotAnObject.h"69 68 #include "JSPromiseDeferred.h" 70 69 #include "JSPropertyNameEnumerator.h" … … 216 215 terminatedExecutionErrorStructure.set(*this, TerminatedExecutionError::createStructure(*this, 0, jsNull())); 217 216 stringStructure.set(*this, JSString::createStructure(*this, 0, jsNull())); 218 notAnObjectStructure.set(*this, JSNotAnObject::createStructure(*this, 0, jsNull()));219 217 propertyNameEnumeratorStructure.set(*this, JSPropertyNameEnumerator::createStructure(*this, 0, jsNull())); 220 218 getterSetterStructure.set(*this, GetterSetter::createStructure(*this, 0, jsNull())); -
TabularUnified trunk/Source/JavaScriptCore/runtime/VM.h ¶
r197595 r197794 285 285 Strong<Structure> terminatedExecutionErrorStructure; 286 286 Strong<Structure> stringStructure; 287 Strong<Structure> notAnObjectStructure;288 287 Strong<Structure> propertyNameIteratorStructure; 289 288 Strong<Structure> propertyNameEnumeratorStructure; -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r197793 r197794 1 2016-03-08 Mark Lam <mark.lam@apple.com> 2 3 synthesizePrototype() and friends need to be followed by exception checks (or equivalent). 4 https://bugs.webkit.org/show_bug.cgi?id=155169 5 6 Reviewed by Geoffrey Garen. 7 8 No new tests because this issue is covered by existing tests when the fix for 9 https://bugs.webkit.org/show_bug.cgi?id=154865 lands. That patch is waiting for 10 this patch to land first so as to not introduce test failures. 11 12 * Modules/plugins/QuickTimePluginReplacement.mm: 13 (WebCore::QuickTimePluginReplacement::installReplacement): 14 * bindings/js/JSDeviceMotionEventCustom.cpp: 15 (WebCore::readAccelerationArgument): 16 (WebCore::readRotationRateArgument): 17 * bindings/js/JSGeolocationCustom.cpp: 18 (WebCore::createPositionOptions): 19 * bindings/js/JSHTMLCanvasElementCustom.cpp: 20 (WebCore::get3DContextAttributes): 21 * bindings/scripts/CodeGeneratorJS.pm: 22 (GenerateConstructorDefinition): 23 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 24 (WebCore::JSTestEventConstructorConstructor::construct): 25 * contentextensions/ContentExtensionParser.cpp: 26 (WebCore::ContentExtensions::getTypeFlags): 27 * html/HTMLMediaElement.cpp: 28 (WebCore::setPageScaleFactorProperty): 29 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): 30 (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): 31 * html/HTMLPlugInImageElement.cpp: 32 (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): 33 1 34 2016-03-08 Oliver Hunt <oliver@apple.com> 2 35 -
TabularUnified trunk/Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm ¶
r197614 r197794 191 191 return false; 192 192 JSC::JSObject* replacementObject = replacementFunction.toObject(exec); 193 ASSERT(!exec->hadException()); 193 194 JSC::CallData callData; 194 195 JSC::CallType callType = replacementObject->methodTable()->getCallData(replacementObject, callData); … … 221 222 // Get the scripting interface. 222 223 value = replacement.get(exec, JSC::Identifier::fromString(exec, "scriptObject")); 223 if (!exec->hadException() && !value.isUndefinedOrNull()) 224 if (!exec->hadException() && !value.isUndefinedOrNull()) { 224 225 m_scriptObject = value.toObject(exec); 226 ASSERT(!exec->hadException()); 227 } 225 228 226 229 if (!m_scriptObject) { -
TabularUnified trunk/Source/WebCore/bindings/js/JSDeviceMotionEventCustom.cpp ¶
r195524 r197794 48 48 // Given the above test, this will always yield an object. 49 49 JSObject* object = value.toObject(&state); 50 ASSERT(!state.hadException()); 50 51 51 52 JSValue xValue = object->get(&state, Identifier::fromString(&state, "x")); … … 86 87 // Given the above test, this will always yield an object. 87 88 JSObject* object = value.toObject(&state); 89 ASSERT(!state.hadException()); 88 90 89 91 JSValue alphaValue = object->get(&state, Identifier::fromString(&state, "alpha")); -
TabularUnified trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp ¶
r191887 r197794 83 83 // Given the above test, this will always yield an object. 84 84 JSObject* object = value.toObject(exec); 85 ASSERT(!exec->hadException()); 85 86 86 87 // Create the dictionary wrapper from the initializer object. -
TabularUnified trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp ¶
r191887 r197794 52 52 53 53 JSObject* initializerObject = initializerValue.toObject(&state); 54 ASSERT(!state.hadException()); 54 55 JSDictionary dictionary(&state, initializerObject); 55 56 -
TabularUnified trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm ¶
r197748 r197794 4821 4821 // Given the above test, this will always yield an object. 4822 4822 JSObject* initializerObject = initializerValue.toObject(state); 4823 ASSERT(!state->hadException()); 4823 4824 4824 4825 // Create the dictionary wrapper from the initializer object. -
TabularUnified trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp ¶
r197648 r197794 89 89 // Given the above test, this will always yield an object. 90 90 JSObject* initializerObject = initializerValue.toObject(state); 91 ASSERT(!state->hadException()); 91 92 92 93 // Create the dictionary wrapper from the initializer object. -
TabularUnified trunk/Source/WebCore/contentextensions/ContentExtensionParser.cpp ¶
r194496 r197794 91 91 92 92 const JSObject* object = typeValue.toObject(&exec); 93 ASSERT(!exec.hadException()); 93 94 if (!isJSArray(object)) 94 95 return ContentExtensionError::JSONInvalidTriggerFlagsArray; -
TabularUnified trunk/Source/WebCore/html/HTMLMediaElement.cpp ¶
r197628 r197794 6310 6310 JSC::PutPropertySlot propertySlot(controllerValue); 6311 6311 JSC::JSObject* controllerObject = controllerValue.toObject(exec); 6312 if (!controllerObject) 6313 return; 6312 6314 controllerObject->methodTable()->put(controllerObject, exec, JSC::Identifier::fromString(exec, "pageScaleFactor"), JSC::jsNumber(pageScaleFactor), propertySlot); 6313 6315 } … … 6356 6358 6357 6359 JSC::JSObject* function = functionValue.toObject(exec); 6360 ASSERT(!exec->hadException()); 6358 6361 JSC::CallData callData; 6359 6362 JSC::CallType callType = function->methodTable()->getCallData(function, callData); … … 6369 6372 // Connect the Media, MediaControllerHost, and Controller so the GC knows about their relationship 6370 6373 JSC::JSObject* mediaJSWrapperObject = mediaJSWrapper.toObject(exec); 6374 ASSERT(!exec->hadException()); 6371 6375 JSC::Identifier controlsHost = JSC::Identifier::fromString(&exec->vm(), "controlsHost"); 6372 6376 … … 6450 6454 6451 6455 JSC::JSObject* function = functionValue.toObject(exec); 6456 ASSERT(!exec->hadException()); 6452 6457 JSC::CallData callData; 6453 6458 JSC::CallType callType = function->methodTable()->getCallData(function, callData); -
TabularUnified trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp ¶
r197614 r197794 405 405 // It is expected the JS file provides a createOverlay(shadowRoot, title, subtitle) function. 406 406 JSC::JSObject* overlay = globalObject->get(exec, JSC::Identifier::fromString(exec, "createOverlay")).toObject(exec); 407 if (!overlay) { 408 ASSERT(exec->hadException()); 409 exec->clearException(); 410 return; 411 } 407 412 JSC::CallData callData; 408 413 JSC::CallType callType = overlay->methodTable()->getCallData(overlay, callData);
Note:
See TracChangeset
for help on using the changeset viewer.