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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp

Issue 2836093004: Remove V8Call and replace with v8::Maybe<T>::To and v8::MaybeLocal<T>::ToLocal. (Closed)
Patch Set: rebase Created 3 years, 8 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
Index: third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
index 544c0ad9f3436d4d94bba9fd76cda3dc97d33019..941ace6018b268317be12056c9b79f7c130686f3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
@@ -25,9 +25,9 @@ ScriptModule ScriptModule::Compile(v8::Isolate* isolate,
v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
v8::Local<v8::Module> module;
- if (!V8Call(V8ScriptRunner::CompileModule(isolate, source, file_name,
- access_control_status),
- module, try_catch)) {
+ if (!V8ScriptRunner::CompileModule(isolate, source, file_name,
+ access_control_status)
+ .ToLocal(&module)) {
// Compilation error is not used in Blink implementaion logic.
// Note: Error message is delivered to user (e.g. console) by message
// listeners set on v8::Isolate. See V8Initializer::initalizeMainThread().
@@ -68,10 +68,9 @@ void ScriptModule::Evaluate(ScriptState* script_state) const {
// TODO(kouhei): We currently don't have a code-path which use return value of
// EvaluateModule. Stop ignoring result once we have such path.
v8::Local<v8::Value> result;
- if (!V8Call(
- V8ScriptRunner::EvaluateModule(module_->NewLocal(isolate),
- script_state->GetContext(), isolate),
- result, try_catch)) {
+ if (!V8ScriptRunner::EvaluateModule(module_->NewLocal(isolate),
+ script_state->GetContext(), isolate)
+ .ToLocal(&result)) {
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698