Chromium Code Reviews

Unified Diff: Source/bindings/v8/custom/V8PromiseCustom.cpp

Issue 121113004: Improve handling of failed integer type conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/bindings/v8/custom/V8PromiseCustom.cpp
diff --git a/Source/bindings/v8/custom/V8PromiseCustom.cpp b/Source/bindings/v8/custom/V8PromiseCustom.cpp
index 6c6a2431ec8a8050c037520fd3e9c79e46eb44d0..eeabb25ce2dbbde2fdceb4f9f0e2c878957ebce1 100644
--- a/Source/bindings/v8/custom/V8PromiseCustom.cpp
+++ b/Source/bindings/v8/custom/V8PromiseCustom.cpp
@@ -628,9 +628,8 @@ v8::Local<v8::Object> V8PromiseCustom::getInternal(v8::Handle<v8::Object> promis
V8PromiseCustom::PromiseState V8PromiseCustom::getState(v8::Handle<v8::Object> internal)
{
v8::Handle<v8::Value> value = internal->GetInternalField(V8PromiseCustom::InternalStateIndex);
- bool ok = false;
- uint32_t number = toInt32(value, ok);
- ASSERT(ok && (number == Pending || number == Fulfilled || number == Rejected || number == Following));
+ uint32_t number = toInt32(value);
+ ASSERT(number == Pending || number == Fulfilled || number == Rejected || number == Following);
return static_cast<PromiseState>(number);
}
« no previous file with comments | « Source/bindings/v8/custom/V8PannerNodeCustom.cpp ('k') | Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine