Changeset 207852 in webkit
- Timestamp:
- Oct 25, 2016 3:41:09 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r207851 r207852 1 2016-10-25 JF Bastien <jfbastien@apple.com> 2 3 Remove redundant argument count check 4 5 Indexing argument out of bounds already returns jsUndefined(). 6 7 Remove redundant argument count check 8 https://bugs.webkit.org/show_bug.cgi?id=163957 9 10 Reviewed by Keith Miller. 11 12 * runtime/ErrorConstructor.cpp: 13 (JSC::Interpreter::constructWithErrorConstructor): 14 (JSC::Interpreter::callErrorConstructor): 15 * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: 16 (JSC::constructJSWebAssemblyRuntimeError): 17 1 18 2016-10-25 Mark Lam <mark.lam@apple.com> 2 19 -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r206386 r207852 53 53 VM& vm = exec->vm(); 54 54 auto scope = DECLARE_THROW_SCOPE(vm); 55 JSValue message = exec->argument Count() ? exec->argument(0) : jsUndefined();55 JSValue message = exec->argument(0); 56 56 Structure* errorStructure = InternalFunction::createSubclassStructure(exec, exec->newTarget(), asInternalFunction(exec->callee())->globalObject()->errorStructure()); 57 57 RETURN_IF_EXCEPTION(scope, encodedJSValue()); … … 67 67 EncodedJSValue JSC_HOST_CALL Interpreter::callErrorConstructor(ExecState* exec) 68 68 { 69 JSValue message = exec->argument Count() ? exec->argument(0) : jsUndefined();69 JSValue message = exec->argument(0); 70 70 Structure* errorStructure = asInternalFunction(exec->callee())->globalObject()->errorStructure(); 71 71 return JSValue::encode(ErrorInstance::create(exec, errorStructure, message, nullptr, TypeNothing, false)); -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
r207825 r207852 49 49 auto& vm = state->vm(); 50 50 auto scope = DECLARE_THROW_SCOPE(vm); 51 JSValue message = state->argument Count() ? state->argument(0) : jsUndefined();51 JSValue message = state->argument(0); 52 52 auto* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), asInternalFunction(state->callee())->globalObject()->WebAssemblyRuntimeErrorStructure()); 53 53 RETURN_IF_EXCEPTION(scope, encodedJSValue());
Note: See TracChangeset
for help on using the changeset viewer.