Changeset 209018 in webkit
- Timestamp:
- Nov 28, 2016 2:21:29 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r209015 r209018 1 2016-11-26 Mark Lam <mark.lam@apple.com> 2 3 Fix exception scope verification failures in miscellaneous files. 4 https://bugs.webkit.org/show_bug.cgi?id=165055 5 6 Reviewed by Saam Barati. 7 8 * runtime/MathObject.cpp: 9 (JSC::mathProtoFuncIMul): 10 * runtime/ModuleLoaderPrototype.cpp: 11 (JSC::moduleLoaderPrototypeParseModule): 12 (JSC::moduleLoaderPrototypeRequestedModules): 13 * runtime/NativeErrorConstructor.cpp: 14 (JSC::Interpreter::constructWithNativeErrorConstructor): 15 * runtime/NumberConstructor.cpp: 16 (JSC::constructWithNumberConstructor): 17 * runtime/SetConstructor.cpp: 18 (JSC::constructSet): 19 * runtime/SetIteratorPrototype.cpp: 20 (JSC::SetIteratorPrototypeFuncNext): 21 * runtime/SparseArrayValueMap.cpp: 22 (JSC::SparseArrayValueMap::putEntry): 23 (JSC::SparseArrayEntry::put): 24 * runtime/TemplateRegistry.cpp: 25 (JSC::TemplateRegistry::getTemplateObject): 26 1 27 2016-11-28 Mark Lam <mark.lam@apple.com> 2 28 -
trunk/Source/JavaScriptCore/runtime/MathObject.cpp
r208209 r209018 298 298 int32_t left = exec->argument(0).toInt32(exec); 299 299 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 300 scope.release(); 300 301 int32_t right = exec->argument(1).toInt32(exec); 301 302 return JSValue::encode(jsNumber(left * right)); -
trunk/Source/JavaScriptCore/runtime/ModuleLoaderPrototype.cpp
r206653 r209018 134 134 135 135 ModuleAnalyzer moduleAnalyzer(exec, moduleKey, sourceCode, moduleProgramNode->varDeclarations(), moduleProgramNode->lexicalVariables()); 136 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 136 137 JSModuleRecord* moduleRecord = moduleAnalyzer.analyze(*moduleProgramNode); 137 138 … … 144 145 auto scope = DECLARE_THROW_SCOPE(vm); 145 146 JSModuleRecord* moduleRecord = jsDynamicCast<JSModuleRecord*>(exec->argument(0)); 146 if (!moduleRecord) 147 if (!moduleRecord) { 148 scope.release(); 147 149 return JSValue::encode(constructEmptyArray(exec, nullptr)); 150 } 148 151 149 152 JSArray* result = constructEmptyArray(exec, nullptr, moduleRecord->requestedModules().size()); 150 153 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 151 154 size_t i = 0; 152 for (auto& key : moduleRecord->requestedModules()) 155 for (auto& key : moduleRecord->requestedModules()) { 153 156 result->putDirectIndex(exec, i++, jsString(exec, key.get())); 154 157 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 158 } 155 159 return JSValue::encode(result); 156 160 } -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r206386 r209018 70 70 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 71 71 ASSERT(errorStructure); 72 scope.release(); 72 73 return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, nullptr, TypeNothing, false)); 73 74 } -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r206386 r209018 89 89 auto scope = DECLARE_THROW_SCOPE(vm); 90 90 double n = exec->argumentCount() ? exec->uncheckedArgument(0).toNumber(exec) : 0; 91 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 91 92 Structure* structure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), exec->lexicalGlobalObject()->numberObjectStructure()); 92 93 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 93 94 94 NumberObject* object = NumberObject::create( exec->vm(), structure);95 object->setInternalValue( exec->vm(), jsNumber(n));95 NumberObject* object = NumberObject::create(vm, structure); 96 object->setInternalValue(vm, jsNumber(n)); 96 97 return JSValue::encode(object); 97 98 } -
trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp
r206386 r209018 69 69 return JSValue::encode(set); 70 70 71 JSValue adderFunction = set->get(exec, exec->propertyNames().add);71 JSValue adderFunction = set->get(exec, vm.propertyNames->add); 72 72 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 73 73 74 74 CallData adderFunctionCallData; 75 75 CallType adderFunctionCallType = getCallData(adderFunction, adderFunctionCallData); 76 if ( adderFunctionCallType == CallType::None)76 if (UNLIKELY(adderFunctionCallType == CallType::None)) 77 77 return JSValue::encode(throwTypeError(exec, scope)); 78 78 79 scope.release(); 79 80 forEachInIterable(exec, iterable, [&](VM&, ExecState* exec, JSValue nextValue) { 80 81 MarkedArgumentBuffer arguments; -
trunk/Source/JavaScriptCore/runtime/SetIteratorPrototype.cpp
r205520 r209018 1 1 /* 2 * Copyright (C) 2013 Apple, Inc. All rights reserved.2 * Copyright (C) 2013, 2016 Apple, Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 57 57 return JSValue::encode(throwTypeError(callFrame, scope, ASCIILiteral("Cannot call SetIterator.next() on a non-SetIterator object"))); 58 58 59 if (iterator->next(callFrame, result)) 59 if (iterator->next(callFrame, result)) { 60 scope.release(); 60 61 return JSValue::encode(createIteratorResultObject(callFrame, result, false)); 62 } 63 scope.release(); 61 64 return JSValue::encode(createIteratorResultObject(callFrame, jsUndefined(), true)); 62 65 } -
trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp
r207859 r209018 106 106 } 107 107 108 scope.release(); 108 109 return entry.put(exec, array, this, value, shouldThrow); 109 110 } … … 167 168 } 168 169 170 scope.release(); 169 171 return callSetter(exec, thisValue, Base::get(), value, shouldThrow ? StrictMode : NotStrictMode); 170 172 } -
trunk/Source/JavaScriptCore/runtime/TemplateRegistry.cpp
r208953 r209018 60 60 for (unsigned index = 0; index < count; ++index) { 61 61 templateObject->putDirectIndex(exec, index, jsString(exec, templateKey.cookedStrings()[index]), ReadOnly | DontDelete, PutDirectIndexLikePutDirect); 62 RETURN_IF_EXCEPTION(scope, nullptr); 62 63 rawObject->putDirectIndex(exec, index, jsString(exec, templateKey.rawStrings()[index]), ReadOnly | DontDelete, PutDirectIndexLikePutDirect); 64 RETURN_IF_EXCEPTION(scope, nullptr); 63 65 } 64 66 … … 66 68 ASSERT(!scope.exception()); 67 69 68 templateObject->putDirect(vm, exec->propertyNames().raw, rawObject, ReadOnly | DontEnum | DontDelete);70 templateObject->putDirect(vm, vm.propertyNames->raw, rawObject, ReadOnly | DontEnum | DontDelete); 69 71 70 72 // Template JSArray hold the reference to JSTemplateRegistryKey to make TemplateRegistryKey pointer live until this JSArray is collected.
Note: See TracChangeset
for help on using the changeset viewer.