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

Unified Diff: Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp

Issue 970403003: bindings: Use V8 MaybeLocal APIs in V8DeviceMotionEventCustom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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: Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp
diff --git a/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp b/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp
index be8d12d3809aa2d30125558c971a5792ca2eb8dc..5b04dcd84cab14042d4f1260c9feb9f20f6078cd 100644
--- a/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp
+++ b/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp
@@ -39,8 +39,7 @@ DeviceMotionData::Acceleration* readAccelerationArgument(v8::Local<v8::Value> va
if (isUndefinedOrNull(value))
return nullptr;
- // Given the test above, this will always yield an object.
- v8::Local<v8::Object> object = value->ToObject(isolate);
+ CALL_V8_WITH_CHECK_MAYBELOCAL_DEFAULT(v8::Object, object, value->ToObject(isolate->GetCurrentContext()), nullptr);
v8::Local<v8::Value> xValue = object->Get(v8AtomicString(isolate, "x"));
if (xValue.IsEmpty())
@@ -71,8 +70,7 @@ DeviceMotionData::RotationRate* readRotationRateArgument(v8::Local<v8::Value> va
if (isUndefinedOrNull(value))
return nullptr;
- // Given the test above, this will always yield an object.
- v8::Local<v8::Object> object = value->ToObject(isolate);
+ CALL_V8_WITH_CHECK_MAYBELOCAL_DEFAULT(v8::Object, object, value->ToObject(isolate->GetCurrentContext()), nullptr);
v8::Local<v8::Value> alphaValue = object->Get(v8AtomicString(isolate, "alpha"));
if (alphaValue.IsEmpty())
« Source/bindings/core/v8/V8BindingMacros.h ('K') | « Source/bindings/core/v8/V8BindingMacros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698