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

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

Issue 2144093002: Adding checks for V8 functions returning Maybe<bool> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding checks for V8 functions returning Maybe<bool> Created 3 years, 9 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/ScriptPromise.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
index e150c07457e9db0671855b0c3d94b653a4c35aa1..33a3f97a5329d6cefa0fd07e15e8d221c3db7f79 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromise.cpp
@@ -29,7 +29,6 @@
*/
#include "bindings/core/v8/ScriptPromise.h"
-
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ToV8.h"
@@ -188,15 +187,15 @@ void ScriptPromise::InternalResolver::resolve(v8::Local<v8::Value> value) {
if (m_resolver.isEmpty())
return;
m_resolver.v8Value().As<v8::Promise::Resolver>()->Resolve(
- m_resolver.context(), value);
+ m_resolver.context(), value).ToChecked();
clear();
}
void ScriptPromise::InternalResolver::reject(v8::Local<v8::Value> value) {
if (m_resolver.isEmpty())
return;
- m_resolver.v8Value().As<v8::Promise::Resolver>()->Reject(m_resolver.context(),
- value);
+ m_resolver.v8Value().As<v8::Promise::Resolver>()->Reject(
+ m_resolver.context(), value).ToChecked();
clear();
}
@@ -311,7 +310,7 @@ v8::Local<v8::Promise> ScriptPromise::rejectRaw(ScriptState* scriptState,
if (!v8::Promise::Resolver::New(scriptState->context()).ToLocal(&resolver))
return v8::Local<v8::Promise>();
v8::Local<v8::Promise> promise = resolver->GetPromise();
- resolver->Reject(scriptState->context(), value);
+ resolver->Reject(scriptState->context(), value).ToChecked();
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698