@@ -1408,19 +1408,19 @@ uint32_t GetIterableLength(i::Isolate* isolate, Local<Context> context,
1408
1408
1409
1409
} // namespace
1410
1410
1411
- // WebAssembly.Exception
1412
- void WebAssemblyException (const v8::FunctionCallbackInfo<v8::Value>& args) {
1411
+ // WebAssembly.Tag
1412
+ void WebAssemblyTag (const v8::FunctionCallbackInfo<v8::Value>& args) {
1413
1413
v8::Isolate* isolate = args.GetIsolate ();
1414
1414
i::Isolate* i_isolate = reinterpret_cast <i::Isolate*>(isolate);
1415
1415
HandleScope scope (isolate);
1416
1416
1417
- ScheduledErrorThrower thrower (i_isolate, " WebAssembly.Exception ()" );
1417
+ ScheduledErrorThrower thrower (i_isolate, " WebAssembly.Tag ()" );
1418
1418
if (!args.IsConstructCall ()) {
1419
- thrower.TypeError (" WebAssembly.Exception must be invoked with 'new'" );
1419
+ thrower.TypeError (" WebAssembly.Tag must be invoked with 'new'" );
1420
1420
return ;
1421
1421
}
1422
1422
if (!args[0 ]->IsObject ()) {
1423
- thrower.TypeError (" Argument 0 must be an exception type" );
1423
+ thrower.TypeError (" Argument 0 must be a tag type" );
1424
1424
return ;
1425
1425
}
1426
1426
@@ -1435,7 +1435,7 @@ void WebAssemblyException(const v8::FunctionCallbackInfo<v8::Value>& args) {
1435
1435
v8::Local<v8::Value> parameters_value;
1436
1436
if (!parameters_maybe.ToLocal (¶meters_value) ||
1437
1437
!parameters_value->IsObject ()) {
1438
- thrower.TypeError (" Argument 0 must be an exception type with 'parameters'" );
1438
+ thrower.TypeError (" Argument 0 must be a tag type with 'parameters'" );
1439
1439
return ;
1440
1440
}
1441
1441
Local<Object> parameters = parameters_value.As <Object>();
@@ -2287,8 +2287,8 @@ void WasmJs::Install(Isolate* isolate, bool exposed_on_global_object) {
2287
2287
2288
2288
// Setup Exception
2289
2289
if (enabled_features.has_eh ()) {
2290
- Handle <JSFunction> exception_constructor = InstallConstructorFunc (
2291
- isolate, webassembly, " Exception " , WebAssemblyException );
2290
+ Handle <JSFunction> exception_constructor =
2291
+ InstallConstructorFunc ( isolate, webassembly, " Tag " , WebAssemblyTag );
2292
2292
context->set_wasm_exception_constructor (*exception_constructor);
2293
2293
SetDummyInstanceTemplate (isolate, exception_constructor);
2294
2294
JSFunction::EnsureHasInitialMap (exception_constructor);
@@ -2349,7 +2349,7 @@ void WasmJs::Install(Isolate* isolate, bool exposed_on_global_object) {
2349
2349
void WasmJs::InstallConditionalFeatures (Isolate* isolate,
2350
2350
Handle <Context> context) {
2351
2351
// Exception handling may have been enabled by an origin trial. If so, make
2352
- // sure that the {WebAssembly.Exception } constructor is set up.
2352
+ // sure that the {WebAssembly.Tag } constructor is set up.
2353
2353
auto enabled_features = i::wasm::WasmFeatures::FromContext (isolate, context);
2354
2354
if (enabled_features.has_eh ()) {
2355
2355
Handle <JSGlobalObject> global = handle (context->global_object (), isolate);
@@ -2368,7 +2368,7 @@ void WasmJs::InstallConditionalFeatures(Isolate* isolate,
2368
2368
}
2369
2369
Handle <JSObject> webassembly = Handle <JSObject>::cast (webassembly_obj);
2370
2370
// Setup Exception
2371
- Handle <String> exception_name = v8_str (isolate, " Exception " );
2371
+ Handle <String> exception_name = v8_str (isolate, " Tag " );
2372
2372
if (JSObject::HasOwnProperty (webassembly, exception_name).FromMaybe (true )) {
2373
2373
// The {Exception} constructor already exists, there is nothing more to
2374
2374
// do.
@@ -2377,14 +2377,14 @@ void WasmJs::InstallConditionalFeatures(Isolate* isolate,
2377
2377
2378
2378
bool has_prototype = true ;
2379
2379
Handle <JSFunction> exception_constructor =
2380
- CreateFunc (isolate, exception_name, WebAssemblyException , has_prototype,
2380
+ CreateFunc (isolate, exception_name, WebAssemblyTag , has_prototype,
2381
2381
SideEffectType::kHasNoSideEffect );
2382
2382
exception_constructor->shared ().set_length (1 );
2383
2383
auto result = Object::SetProperty (
2384
2384
isolate, webassembly, exception_name, exception_constructor,
2385
2385
StoreOrigin::kNamed , Just (ShouldThrow::kDontThrow ));
2386
2386
if (result.is_null ()) {
2387
- // Setting the {Exception } constructor failed. We just bail out.
2387
+ // Setting the {Tag } constructor failed. We just bail out.
2388
2388
return ;
2389
2389
}
2390
2390
// Install the constructor on the context.
0 commit comments