Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: src/bootstrapper.cc

Issue 2421453002: [wasm] Implement {Compile,Runtime}Error; fix traps from start function (Closed)
Patch Set: Fix merge artefact Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 6b2f5abcc4bbfb468fdffa1cf439ace4622c5d8c..68e8dcc7728633200a6e5006b844f4d7673dd667 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1056,7 +1056,6 @@ static void InstallError(Isolate* isolate, Handle<JSObject> global,
Builtins::kErrorPrototypeToString, 0, true);
isolate->native_context()->set_error_to_string(*to_string_fun);
} else {
- DCHECK(context_index != Context::ERROR_FUNCTION_INDEX);
DCHECK(isolate->native_context()->error_to_string()->IsJSFunction());
InstallFunction(prototype, isolate->error_to_string(),
@@ -1912,6 +1911,16 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Context::MAKE_URI_ERROR_INDEX);
}
+ { // -- C o m p i l e E r r o r
+ Handle<JSObject> dummy = factory->NewJSObject(isolate->object_function());
+ InstallError(isolate, dummy, factory->CompileError_string(),
+ Context::WASM_COMPILE_ERROR_FUNCTION_INDEX);
+
+ // -- R u n t i m e E r r o r
+ InstallError(isolate, dummy, factory->RuntimeError_string(),
+ Context::WASM_RUNTIME_ERROR_FUNCTION_INDEX);
+ }
+
// Initialize the embedder data slot.
Handle<FixedArray> embedder_data = factory->NewFixedArray(3);
native_context()->set_embedder_data(*embedder_data);
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698