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

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

Issue 1013643002: [bindings] Make sure v8::Isolate is being passed to toXXX() conversion routines as argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/bindings/modules/v8/custom/V8DeviceOrientationEventCustom.cpp
diff --git a/Source/bindings/modules/v8/custom/V8DeviceOrientationEventCustom.cpp b/Source/bindings/modules/v8/custom/V8DeviceOrientationEventCustom.cpp
index 278912245fc36af99c900aea5a3254af5dde2dcb..7276cba3fb34d717efbb39f6cfb147f26371d9a7 100644
--- a/Source/bindings/modules/v8/custom/V8DeviceOrientationEventCustom.cpp
+++ b/Source/bindings/modules/v8/custom/V8DeviceOrientationEventCustom.cpp
@@ -34,12 +34,13 @@ namespace blink {
void V8DeviceOrientationEvent::initDeviceOrientationEventMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "initDeviceOrientationEvent", "DeviceOrientationEvent", info.Holder(), info.GetIsolate());
+ v8::Isolate* isolate = info.GetIsolate();
+ ExceptionState exceptionState(ExceptionState::ExecutionContext, "initDeviceOrientationEvent", "DeviceOrientationEvent", info.Holder(), isolate);
DeviceOrientationEvent* impl = V8DeviceOrientationEvent::toImpl(info.Holder());
V8StringResource<> type(info[0]);
if (!type.prepare())
return;
- v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
bool bubbles;
V8_CALL(bubbles, info[1], BooleanValue(context), return);
bool cancelable;
@@ -49,21 +50,21 @@ void V8DeviceOrientationEvent::initDeviceOrientationEventMethodCustom(const v8::
bool alphaProvided = !isUndefinedOrNull(info[3]);
double alpha = 0;
if (alphaProvided) {
- alpha = toRestrictedDouble(info[3], exceptionState);
+ alpha = toRestrictedDouble(isolate, info[3], exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
bool betaProvided = !isUndefinedOrNull(info[4]);
double beta = 0;
if (betaProvided) {
- beta = toRestrictedDouble(info[4], exceptionState);
+ beta = toRestrictedDouble(isolate, info[4], exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
bool gammaProvided = !isUndefinedOrNull(info[5]);
double gamma = 0;
if (gammaProvided) {
- gamma = toRestrictedDouble(info[5], exceptionState);
+ gamma = toRestrictedDouble(isolate, info[5], exceptionState);
if (exceptionState.throwIfNeeded())
return;
}
« no previous file with comments | « Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698