Changeset 274552 in webkit
- Timestamp:
- Mar 16, 2021 11:02:42 PM (16 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 20 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/error-cause.js (added)
-
Source/JavaScriptCore/API/JSObjectRef.cpp (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/AggregateError.cpp (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/AggregateError.h (modified) (1 diff)
-
Source/JavaScriptCore/runtime/AggregateErrorConstructor.cpp (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/CommonIdentifiers.h (modified) (1 diff)
-
Source/JavaScriptCore/runtime/Error.cpp (modified) (8 diffs)
-
Source/JavaScriptCore/runtime/ErrorConstructor.cpp (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/ErrorInstance.cpp (modified) (3 diffs)
-
Source/JavaScriptCore/runtime/ErrorInstance.h (modified) (2 diffs)
-
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp (modified) (1 diff)
-
Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp (modified) (2 diffs)
-
Source/JavaScriptCore/runtime/NullSetterFunction.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/JSWebAssemblyCompileError.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/JSWebAssemblyLinkError.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp (modified) (1 diff)
-
Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r274539 r274552 1 2021-03-16 Ross Kirsling <ross.kirsling@sony.com> 2 3 [JSC] Implement Error#cause 4 https://bugs.webkit.org/show_bug.cgi?id=223302 5 6 Reviewed by Yusuke Suzuki. 7 8 Add tests. test262 doesn't currently have any, but the spec is exceedingly simple anyway. 9 10 * stress/error-cause.js: Added. 11 1 12 2021-03-16 Saam Barati <sbarati@apple.com> 2 13 -
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r271269 r274552 232 232 233 233 JSValue message = argumentCount ? toJS(globalObject, arguments[0]) : jsUndefined(); 234 JSValue options = argumentCount > 1 ? toJS(globalObject, arguments[1]) : jsUndefined(); 234 235 Structure* errorStructure = globalObject->errorStructure(); 235 JSObject* result = ErrorInstance::create(globalObject, errorStructure, message );236 JSObject* result = ErrorInstance::create(globalObject, errorStructure, message, options); 236 237 237 238 if (handleExceptionIfNeeded(scope, ctx, exception) == ExceptionStatus::DidThrow) -
trunk/Source/JavaScriptCore/ChangeLog
r274539 r274552 1 2021-03-16 Ross Kirsling <ross.kirsling@sony.com> 2 3 [JSC] Implement Error#cause 4 https://bugs.webkit.org/show_bug.cgi?id=223302 5 6 Reviewed by Yusuke Suzuki. 7 8 This patch implements the Error.prototype.cause proposal, which reached Stage 3 at last week's TC39 meeting: 9 https://github.com/tc39/proposal-error-cause 10 11 This very simple proposal allows to one reference the "error that caused this one" in a cascading scenario. 12 It does so by adding an options bag parameter to the Error, _NativeError_, and AggregateError constructors. 13 If it is an object with a `cause` property, the property will be used; if not, nothing happens at all. 14 15 * API/JSObjectRef.cpp: 16 (JSObjectMakeError): 17 * runtime/AggregateError.cpp: 18 (JSC::AggregateError::finishCreation): 19 (JSC::AggregateError::create): 20 * runtime/AggregateError.h: 21 * runtime/AggregateErrorConstructor.cpp: 22 (JSC::JSC_DEFINE_HOST_FUNCTION): 23 * runtime/CommonIdentifiers.h: 24 * runtime/Error.cpp: 25 (JSC::createError): 26 (JSC::createEvalError): 27 (JSC::createRangeError): 28 (JSC::createReferenceError): 29 (JSC::createSyntaxError): 30 (JSC::createTypeError): 31 (JSC::createURIError): 32 (JSC::createGetterTypeError): 33 * runtime/ErrorConstructor.cpp: 34 (JSC::JSC_DEFINE_HOST_FUNCTION): 35 * runtime/ErrorInstance.cpp: 36 (JSC::ErrorInstance::create): 37 (JSC::ErrorInstance::finishCreation): 38 * runtime/ErrorInstance.h: 39 (JSC::ErrorInstance::create): 40 * runtime/JSGlobalObjectFunctions.cpp: 41 (JSC::JSC_DEFINE_HOST_FUNCTION): 42 * runtime/NativeErrorConstructor.cpp: 43 (JSC::NativeErrorConstructor<errorType>::constructImpl): 44 (JSC::NativeErrorConstructor<errorType>::callImpl): 45 * runtime/NullSetterFunction.cpp: 46 (JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION): 47 * wasm/js/JSWebAssemblyCompileError.cpp: 48 (JSC::JSWebAssemblyCompileError::create): 49 * wasm/js/JSWebAssemblyLinkError.cpp: 50 (JSC::JSWebAssemblyLinkError::create): 51 * wasm/js/JSWebAssemblyRuntimeError.cpp: 52 (JSC::JSWebAssemblyRuntimeError::create): 53 * wasm/js/WebAssemblyCompileErrorConstructor.cpp: 54 (JSC::JSC_DEFINE_HOST_FUNCTION): 55 * wasm/js/WebAssemblyLinkErrorConstructor.cpp: 56 (JSC::JSC_DEFINE_HOST_FUNCTION): 57 * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: 58 (JSC::JSC_DEFINE_HOST_FUNCTION): 59 1 60 2021-03-16 Saam Barati <sbarati@apple.com> 2 61 -
trunk/Source/JavaScriptCore/runtime/AggregateError.cpp
r273203 r274552 41 41 } 42 42 43 void AggregateError::finishCreation(VM& vm, JSGlobalObject* globalObject, const MarkedArgumentBuffer& errors, const String& message, SourceAppender appender, RuntimeType type, bool useCurrentFrame)43 void AggregateError::finishCreation(VM& vm, JSGlobalObject* globalObject, const MarkedArgumentBuffer& errors, const String& message, JSValue cause, SourceAppender appender, RuntimeType type, bool useCurrentFrame) 44 44 { 45 Base::finishCreation(vm, globalObject, message, appender, type, useCurrentFrame);45 Base::finishCreation(vm, globalObject, message, cause, appender, type, useCurrentFrame); 46 46 ASSERT(inherits(vm, info())); 47 47 … … 51 51 } 52 52 53 AggregateError* AggregateError::create(JSGlobalObject* globalObject, VM& vm, Structure* structure, JSValue errors, JSValue message, SourceAppender appender, RuntimeType type, bool useCurrentFrame)53 AggregateError* AggregateError::create(JSGlobalObject* globalObject, VM& vm, Structure* structure, JSValue errors, JSValue message, JSValue options, SourceAppender appender, RuntimeType type, bool useCurrentFrame) 54 54 { 55 55 auto scope = DECLARE_THROW_SCOPE(vm); 56 56 57 String messageString ;58 if (!message.isUndefined()) {59 messageString = message.toWTFString(globalObject); 60 RETURN_IF_EXCEPTION(scope, nullptr);61 }57 String messageString = message.isUndefined() ? String() : message.toWTFString(globalObject); 58 RETURN_IF_EXCEPTION(scope, nullptr); 59 60 JSValue cause = !options.isObject() ? jsUndefined() : options.get(globalObject, vm.propertyNames->cause); 61 RETURN_IF_EXCEPTION(scope, nullptr); 62 62 63 63 MarkedArgumentBuffer errorsList; … … 69 69 RETURN_IF_EXCEPTION(scope, nullptr); 70 70 71 RELEASE_AND_RETURN(scope, create(globalObject, vm, structure, errorsList, messageString, appender, type, useCurrentFrame));71 RELEASE_AND_RETURN(scope, create(globalObject, vm, structure, errorsList, messageString, cause, appender, type, useCurrentFrame)); 72 72 } 73 73 -
trunk/Source/JavaScriptCore/runtime/AggregateError.h
r263006 r274552 50 50 } 51 51 52 static AggregateError* create(JSGlobalObject* globalObject, VM& vm, Structure* structure, const MarkedArgumentBuffer& errors, const String& message, SourceAppender appender = nullptr, RuntimeType type = TypeNothing, bool useCurrentFrame = true)52 static AggregateError* create(JSGlobalObject* globalObject, VM& vm, Structure* structure, const MarkedArgumentBuffer& errors, const String& message, JSValue cause, SourceAppender appender = nullptr, RuntimeType type = TypeNothing, bool useCurrentFrame = true) 53 53 { 54 54 auto* instance = new (NotNull, allocateCell<AggregateError>(vm.heap)) AggregateError(vm, structure); 55 instance->finishCreation(vm, globalObject, errors, message, appender, type, useCurrentFrame);55 instance->finishCreation(vm, globalObject, errors, message, cause, appender, type, useCurrentFrame); 56 56 return instance; 57 57 } 58 58 59 static AggregateError* create(JSGlobalObject*, VM&, Structure*, JSValue errors, JSValue message, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true);59 static AggregateError* create(JSGlobalObject*, VM&, Structure*, JSValue errors, JSValue message, JSValue options, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true); 60 60 61 void finishCreation(VM&, JSGlobalObject*, const MarkedArgumentBuffer& errors, const String& message, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true);61 void finishCreation(VM&, JSGlobalObject*, const MarkedArgumentBuffer& errors, const String& message, JSValue cause, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true); 62 62 63 63 private: -
trunk/Source/JavaScriptCore/runtime/AggregateErrorConstructor.cpp
r273661 r274552 61 61 JSValue errors = callFrame->argument(0); 62 62 JSValue message = callFrame->argument(1); 63 JSValue options = callFrame->argument(2); 63 64 Structure* errorStructure = globalObject->errorStructure(ErrorType::AggregateError); 64 return JSValue::encode(AggregateError::create(globalObject, vm, errorStructure, errors, message, nullptr, TypeNothing, false));65 return JSValue::encode(AggregateError::create(globalObject, vm, errorStructure, errors, message, options, nullptr, TypeNothing, false)); 65 66 } 66 67 … … 71 72 JSValue errors = callFrame->argument(0); 72 73 JSValue message = callFrame->argument(1); 74 JSValue options = callFrame->argument(2); 73 75 74 76 JSObject* newTarget = asObject(callFrame->newTarget()); … … 77 79 ASSERT(errorStructure); 78 80 79 RELEASE_AND_RETURN(scope, JSValue::encode(AggregateError::create(globalObject, vm, errorStructure, errors, message, nullptr, TypeNothing, false)));81 RELEASE_AND_RETURN(scope, JSValue::encode(AggregateError::create(globalObject, vm, errorStructure, errors, message, options, nullptr, TypeNothing, false))); 80 82 } 81 83 -
trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h
r273086 r274552 85 85 macro(caller) \ 86 86 macro(caseFirst) \ 87 macro(cause) \ 87 88 macro(clear) \ 88 89 macro(collation) \ -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r273203 r274552 36 36 { 37 37 ASSERT(!message.isEmpty()); 38 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(), message, appender, TypeNothing, ErrorType::Error, true);38 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(), message, jsUndefined(), appender, TypeNothing, ErrorType::Error, true); 39 39 } 40 40 … … 42 42 { 43 43 ASSERT(!message.isEmpty()); 44 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::EvalError), message, appender, TypeNothing, ErrorType::EvalError, true);44 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::EvalError), message, jsUndefined(), appender, TypeNothing, ErrorType::EvalError, true); 45 45 } 46 46 … … 48 48 { 49 49 ASSERT(!message.isEmpty()); 50 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::RangeError), message, appender, TypeNothing, ErrorType::RangeError, true);50 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::RangeError), message, jsUndefined(), appender, TypeNothing, ErrorType::RangeError, true); 51 51 } 52 52 … … 54 54 { 55 55 ASSERT(!message.isEmpty()); 56 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::ReferenceError), message, appender, TypeNothing, ErrorType::ReferenceError, true);56 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::ReferenceError), message, jsUndefined(), appender, TypeNothing, ErrorType::ReferenceError, true); 57 57 } 58 58 … … 60 60 { 61 61 ASSERT(!message.isEmpty()); 62 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::SyntaxError), message, appender, TypeNothing, ErrorType::SyntaxError, true);62 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::SyntaxError), message, jsUndefined(), appender, TypeNothing, ErrorType::SyntaxError, true); 63 63 } 64 64 … … 66 66 { 67 67 ASSERT(!message.isEmpty()); 68 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::TypeError), message, appender, type, ErrorType::TypeError, true);68 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::TypeError), message, jsUndefined(), appender, type, ErrorType::TypeError, true); 69 69 } 70 70 … … 77 77 { 78 78 ASSERT(!message.isEmpty()); 79 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::URIError), message, appender, TypeNothing, ErrorType::URIError, true);79 return ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::URIError), message, jsUndefined(), appender, TypeNothing, ErrorType::URIError, true); 80 80 } 81 81 … … 114 114 { 115 115 ASSERT(!message.isEmpty()); 116 auto* error = ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::TypeError), message, nullptr, TypeNothing, ErrorType::TypeError);116 auto* error = ErrorInstance::create(globalObject, globalObject->vm(), globalObject->errorStructure(ErrorType::TypeError), message, jsUndefined(), nullptr, TypeNothing, ErrorType::TypeError); 117 117 error->setNativeGetterTypeError(); 118 118 return error; -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r273661 r274552 54 54 auto scope = DECLARE_THROW_SCOPE(vm); 55 55 JSValue message = callFrame->argument(0); 56 JSValue options = callFrame->argument(1); 56 57 57 58 JSObject* newTarget = asObject(callFrame->newTarget()); … … 59 60 RETURN_IF_EXCEPTION(scope, { }); 60 61 61 RELEASE_AND_RETURN(scope, JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, ErrorType::Error, false)));62 RELEASE_AND_RETURN(scope, JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, options, nullptr, TypeNothing, ErrorType::Error, false))); 62 63 } 63 64 … … 65 66 { 66 67 JSValue message = callFrame->argument(0); 68 JSValue options = callFrame->argument(1); 67 69 Structure* errorStructure = globalObject->errorStructure(); 68 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, ErrorType::Error, false));70 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, options, nullptr, TypeNothing, ErrorType::Error, false)); 69 71 } 70 72 -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp
r273203 r274552 45 45 } 46 46 47 ErrorInstance* ErrorInstance::create(JSGlobalObject* globalObject, Structure* structure, JSValue message, SourceAppender appender, RuntimeType type, ErrorType errorType, bool useCurrentFrame)47 ErrorInstance* ErrorInstance::create(JSGlobalObject* globalObject, Structure* structure, JSValue message, JSValue options, SourceAppender appender, RuntimeType type, ErrorType errorType, bool useCurrentFrame) 48 48 { 49 49 VM& vm = globalObject->vm(); 50 50 auto scope = DECLARE_THROW_SCOPE(vm); 51 51 52 String messageString = message.isUndefined() ? String() : message.toWTFString(globalObject); 52 53 RETURN_IF_EXCEPTION(scope, nullptr); 53 return create(globalObject, vm, structure, messageString, appender, type, errorType, useCurrentFrame); 54 55 JSValue cause = !options.isObject() ? jsUndefined() : options.get(globalObject, vm.propertyNames->cause); 56 RETURN_IF_EXCEPTION(scope, nullptr); 57 58 return create(globalObject, vm, structure, messageString, cause, appender, type, errorType, useCurrentFrame); 54 59 } 55 60 … … 106 111 } 107 112 108 void ErrorInstance::finishCreation(VM& vm, JSGlobalObject* globalObject, const String& message, SourceAppender appender, RuntimeType type, bool useCurrentFrame)113 void ErrorInstance::finishCreation(VM& vm, JSGlobalObject* globalObject, const String& message, JSValue cause, SourceAppender appender, RuntimeType type, bool useCurrentFrame) 109 114 { 110 115 Base::finishCreation(vm); … … 132 137 if (!messageWithSource.isNull()) 133 138 putDirect(vm, vm.propertyNames->message, jsString(vm, messageWithSource), static_cast<unsigned>(PropertyAttribute::DontEnum)); 139 140 if (!cause.isUndefined()) 141 putDirect(vm, vm.propertyNames->cause, cause, static_cast<unsigned>(PropertyAttribute::DontEnum)); 134 142 } 135 143 -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.h
r273203 r274552 55 55 } 56 56 57 static ErrorInstance* create(JSGlobalObject* globalObject, VM& vm, Structure* structure, const String& message, SourceAppender appender = nullptr, RuntimeType type = TypeNothing, ErrorType errorType = ErrorType::Error, bool useCurrentFrame = true)57 static ErrorInstance* create(JSGlobalObject* globalObject, VM& vm, Structure* structure, const String& message, JSValue cause, SourceAppender appender = nullptr, RuntimeType type = TypeNothing, ErrorType errorType = ErrorType::Error, bool useCurrentFrame = true) 58 58 { 59 59 ErrorInstance* instance = new (NotNull, allocateCell<ErrorInstance>(vm.heap)) ErrorInstance(vm, structure, errorType); 60 instance->finishCreation(vm, globalObject, message, appender, type, useCurrentFrame);60 instance->finishCreation(vm, globalObject, message, cause, appender, type, useCurrentFrame); 61 61 return instance; 62 62 } 63 63 64 static ErrorInstance* create(JSGlobalObject*, Structure*, JSValue message, SourceAppender = nullptr, RuntimeType = TypeNothing, ErrorType = ErrorType::Error, bool useCurrentFrame = true);64 static ErrorInstance* create(JSGlobalObject*, Structure*, JSValue message, JSValue options, SourceAppender = nullptr, RuntimeType = TypeNothing, ErrorType = ErrorType::Error, bool useCurrentFrame = true); 65 65 66 66 bool hasSourceAppender() const { return !!m_sourceAppender; } … … 95 95 explicit ErrorInstance(VM&, Structure*, ErrorType); 96 96 97 void finishCreation(VM&, JSGlobalObject*, const String& , SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true);97 void finishCreation(VM&, JSGlobalObject*, const String& message, JSValue cause, SourceAppender = nullptr, RuntimeType = TypeNothing, bool useCurrentFrame = true); 98 98 99 99 static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r273203 r274552 696 696 { 697 697 Structure* errorStructure = globalObject->errorStructure(ErrorType::TypeError); 698 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, callFrame->argument(0), nullptr, TypeNothing, ErrorType::TypeError, false));698 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, callFrame->argument(0), jsUndefined(), nullptr, TypeNothing, ErrorType::TypeError, false)); 699 699 } 700 700 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r273661 r274552 51 51 auto scope = DECLARE_THROW_SCOPE(vm); 52 52 JSValue message = callFrame->argument(0); 53 JSValue options = callFrame->argument(1); 53 54 54 55 JSObject* newTarget = asObject(callFrame->newTarget()); 55 56 Structure* errorStructure = JSC_GET_DERIVED_STRUCTURE(vm, errorStructureWithErrorType<errorType>, newTarget, callFrame->jsCallee()); 56 57 RETURN_IF_EXCEPTION(scope, { }); 57 RELEASE_AND_RETURN(scope, JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, errorType, false)));58 RELEASE_AND_RETURN(scope, JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, options, nullptr, TypeNothing, errorType, false))); 58 59 } 59 60 … … 62 63 { 63 64 JSValue message = callFrame->argument(0); 65 JSValue options = callFrame->argument(1); 64 66 Structure* errorStructure = globalObject->errorStructure(errorType); 65 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, errorType, false));67 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, options, nullptr, TypeNothing, errorType, false)); 66 68 } 67 69 -
trunk/Source/JavaScriptCore/runtime/NullSetterFunction.cpp
r273203 r274552 95 95 // This function is only called from IC. And we do not want to include this frame in Error's stack. 96 96 constexpr bool useCurrentFrame = false; 97 throwException(globalObject, scope, ErrorInstance::create(globalObject, vm, globalObject->errorStructure(ErrorType::TypeError), ReadonlyPropertyWriteError, nullptr, TypeNothing, ErrorType::TypeError, useCurrentFrame));97 throwException(globalObject, scope, ErrorInstance::create(globalObject, vm, globalObject->errorStructure(ErrorType::TypeError), ReadonlyPropertyWriteError, jsUndefined(), nullptr, TypeNothing, ErrorType::TypeError, useCurrentFrame)); 98 98 return { }; 99 99 } -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCompileError.cpp
r273203 r274552 37 37 auto* instance = new (NotNull, allocateCell<JSWebAssemblyCompileError>(vm.heap)) JSWebAssemblyCompileError(vm, structure); 38 38 bool useCurrentFrame = true; 39 instance->finishCreation(vm, globalObject, message, defaultSourceAppender, TypeNothing, useCurrentFrame);39 instance->finishCreation(vm, globalObject, message, jsUndefined(), defaultSourceAppender, TypeNothing, useCurrentFrame); 40 40 return instance; 41 41 } -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyLinkError.cpp
r273203 r274552 37 37 auto* instance = new (NotNull, allocateCell<JSWebAssemblyLinkError>(vm.heap)) JSWebAssemblyLinkError(vm, structure); 38 38 bool useCurrentFrame = true; 39 instance->finishCreation(vm, globalObject, message, defaultSourceAppender, TypeNothing, useCurrentFrame);39 instance->finishCreation(vm, globalObject, message, jsUndefined(), defaultSourceAppender, TypeNothing, useCurrentFrame); 40 40 return instance; 41 41 } -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.cpp
r273203 r274552 37 37 auto* instance = new (NotNull, allocateCell<JSWebAssemblyRuntimeError>(vm.heap)) JSWebAssemblyRuntimeError(vm, structure); 38 38 bool useCurrentFrame = true; 39 instance->finishCreation(vm, globalObject, message, defaultSourceAppender, TypeNothing, useCurrentFrame);39 instance->finishCreation(vm, globalObject, message, jsUndefined(), defaultSourceAppender, TypeNothing, useCurrentFrame); 40 40 return instance; 41 41 } -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp
r273661 r274552 64 64 JSValue message = callFrame->argument(0); 65 65 Structure* errorStructure = globalObject->webAssemblyCompileErrorStructure(); 66 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, ErrorType::Error, false));66 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, jsUndefined(), nullptr, TypeNothing, ErrorType::Error, false)); 67 67 } 68 68 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp
r273661 r274552 64 64 JSValue message = callFrame->argument(0); 65 65 Structure* errorStructure = globalObject->webAssemblyLinkErrorStructure(); 66 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, ErrorType::Error, false));66 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, jsUndefined(), nullptr, TypeNothing, ErrorType::Error, false)); 67 67 } 68 68 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
r273661 r274552 66 66 JSValue message = callFrame->argument(0); 67 67 Structure* errorStructure = globalObject->webAssemblyRuntimeErrorStructure(); 68 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, nullptr, TypeNothing, ErrorType::Error, false));68 return JSValue::encode(ErrorInstance::create(globalObject, errorStructure, message, jsUndefined(), nullptr, TypeNothing, ErrorType::Error, false)); 69 69 } 70 70
Note: See TracChangeset
for help on using the changeset viewer.