|
|
Chromium Code Reviews
DescriptionAdd @@toStringTag for WebAssembly classes
R=titzer@chromium.org
BUG=
Review-Url: https://codereview.chromium.org/2625133005
Cr-Commit-Position: refs/heads/master@{#42379}
Committed: https://chromium.googlesource.com/v8/v8/+/4f556e9e4b0679a862822f48e05511200194c632
Patch Set 1 #Patch Set 2 : Activate additional tests #Patch Set 3 : Rebase #Patch Set 4 : Rebase once more #Messages
Total messages: 22 (12 generated)
Patchset #2 (id:20001) has been deleted
lgtm
The CQ bit was checked by rossberg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_chromium_gn_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_chromium_gn_rel/bu...)
The CQ bit was checked by rossberg@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_linux_chromium_gn_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_chromium_gn_rel/bu...)
The CQ bit was checked by rossberg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from titzer@chromium.org Link to the patchset: https://codereview.chromium.org/2625133005/#ps60001 (title: "Rebase")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for src/wasm/wasm-js.cc:
While running git apply --index -p1;
error: patch failed: src/wasm/wasm-js.cc:795
error: src/wasm/wasm-js.cc: patch does not apply
Patch: src/wasm/wasm-js.cc
Index: src/wasm/wasm-js.cc
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
index
3fd70cceaa14200a2c5ce2b55bde8c35fafab9b7..ed6a3e091b4d93c3168235c998c0bd5c0ea00185
100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -775,14 +775,12 @@ void WasmJs::Install(Isolate* isolate) {
Handle<JSObject> webassembly = factory->NewJSObject(cons, TENURED);
PropertyAttributes attributes = static_cast<PropertyAttributes>(DONT_ENUM);
JSObject::AddProperty(global, name, webassembly, attributes);
-
- // Setup compile
+ PropertyAttributes ro_attributes =
+ static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY);
+ JSObject::AddProperty(webassembly, factory->to_string_tag_symbol(),
+ v8_str(isolate, "WebAssembly"), ro_attributes);
InstallFunc(isolate, webassembly, "compile", WebAssemblyCompile, 1);
-
- // Setup validate
InstallFunc(isolate, webassembly, "validate", WebAssemblyValidate, 1);
-
- // Setup instantiate
InstallFunc(isolate, webassembly, "instantiate", WebAssemblyInstantiate, 1);
// Setup Module
@@ -795,12 +793,14 @@ void WasmJs::Install(Isolate* isolate) {
i::JS_OBJECT_TYPE, i::JSObject::kHeaderSize +
WasmModuleObject::kFieldCount * i::kPointerSize);
JSFunction::SetInitialMap(module_constructor, module_map, module_proto);
- JSObject::AddProperty(module_proto, isolate->factory()->constructor_string(),
- module_constructor, DONT_ENUM);
InstallFunc(isolate, module_constructor, "imports", WebAssemblyModuleImports,
1);
InstallFunc(isolate, module_constructor, "exports", WebAssemblyModuleExports,
1);
+ JSObject::AddProperty(module_proto, isolate->factory()->constructor_string(),
+ module_constructor, DONT_ENUM);
+ JSObject::AddProperty(module_proto, factory->to_string_tag_symbol(),
+ v8_str(isolate, "WebAssembly.Module"), ro_attributes);
// Setup Instance
Handle<JSFunction> instance_constructor =
@@ -815,6 +815,8 @@ void WasmJs::Install(Isolate* isolate) {
JSObject::AddProperty(instance_proto,
isolate->factory()->constructor_string(),
instance_constructor, DONT_ENUM);
+ JSObject::AddProperty(instance_proto, factory->to_string_tag_symbol(),
+ v8_str(isolate, "WebAssembly.Instance"),
ro_attributes);
// Setup Table
Handle<JSFunction> table_constructor =
@@ -832,6 +834,8 @@ void WasmJs::Install(Isolate* isolate) {
InstallFunc(isolate, table_proto, "grow", WebAssemblyTableGrow, 1);
InstallFunc(isolate, table_proto, "get", WebAssemblyTableGet, 1);
InstallFunc(isolate, table_proto, "set", WebAssemblyTableSet, 2);
+ JSObject::AddProperty(table_proto, factory->to_string_tag_symbol(),
+ v8_str(isolate, "WebAssembly.Table"), ro_attributes);
// Setup Memory
Handle<JSFunction> memory_constructor =
@@ -847,6 +851,8 @@ void WasmJs::Install(Isolate* isolate) {
memory_constructor, DONT_ENUM);
InstallFunc(isolate, memory_proto, "grow", WebAssemblyMemoryGrow, 1);
InstallGetter(isolate, memory_proto, "buffer", WebAssemblyMemoryGetBuffer);
+ JSObject::AddProperty(memory_proto, factory->to_string_tag_symbol(),
+ v8_str(isolate, "WebAssembly.Memory"), ro_attributes);
// Setup errors
attributes = static_cast<PropertyAttributes>(DONT_ENUM);
The CQ bit was checked by rossberg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from titzer@chromium.org Link to the patchset: https://codereview.chromium.org/2625133005/#ps80001 (title: "Rebase once more")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1484578935522450,
"parent_rev": "3e4c170bc7f0f8ceb73fee904d83a253b1cb7c99", "commit_rev":
"4f556e9e4b0679a862822f48e05511200194c632"}
Message was sent while issue was closed.
Description was changed from ========== Add @@toStringTag for WebAssembly classes R=titzer@chromium.org BUG= ========== to ========== Add @@toStringTag for WebAssembly classes R=titzer@chromium.org BUG= Review-Url: https://codereview.chromium.org/2625133005 Cr-Commit-Position: refs/heads/master@{#42379} Committed: https://chromium.googlesource.com/v8/v8/+/4f556e9e4b0679a862822f48e0551120019... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/v8/v8/+/4f556e9e4b0679a862822f48e0551120019... |
