| 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())
|
|
|