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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/custom/V8DeviceMotionEventCustom.cpp

Issue 2566823002: Remove deprecated ExceptionState constructors. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 return DeviceMotionData::RotationRate::create( 119 return DeviceMotionData::RotationRate::create(
120 canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma); 120 canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
121 } 121 }
122 122
123 } // namespace 123 } // namespace
124 124
125 void V8DeviceMotionEvent::initDeviceMotionEventMethodCustom( 125 void V8DeviceMotionEvent::initDeviceMotionEventMethodCustom(
126 const v8::FunctionCallbackInfo<v8::Value>& info) { 126 const v8::FunctionCallbackInfo<v8::Value>& info) {
127 // TODO(haraken): This custom binding should mimic auto-generated code more. 127 // TODO(haraken): This custom binding should mimic auto-generated code more.
128 ExceptionState exceptionState(ExceptionState::ExecutionContext, 128 ExceptionState exceptionState(info.GetIsolate(),
129 "initDeviceMotionEvent", "DeviceMotionEvent", 129 ExceptionState::ExecutionContext,
130 info.Holder(), info.GetIsolate()); 130 "DeviceMotionEvent", "initDeviceMotionEvent");
131 DeviceMotionEvent* impl = V8DeviceMotionEvent::toImpl(info.Holder()); 131 DeviceMotionEvent* impl = V8DeviceMotionEvent::toImpl(info.Holder());
132 v8::Isolate* isolate = info.GetIsolate(); 132 v8::Isolate* isolate = info.GetIsolate();
133 V8StringResource<> type(info[0]); 133 V8StringResource<> type(info[0]);
134 if (!type.prepare()) 134 if (!type.prepare())
135 return; 135 return;
136 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext(); 136 v8::Local<v8::Context> context = info.GetIsolate()->GetCurrentContext();
137 bool bubbles = false; 137 bool bubbles = false;
138 if (!info[1]->BooleanValue(context).To(&bubbles)) 138 if (!info[1]->BooleanValue(context).To(&bubbles))
139 return; 139 return;
140 bool cancelable = false; 140 bool cancelable = false;
(...skipping 12 matching lines...) Expand all
153 if (exceptionState.hadException()) 153 if (exceptionState.hadException())
154 return; 154 return;
155 } 155 }
156 DeviceMotionData* deviceMotionData = 156 DeviceMotionData* deviceMotionData =
157 DeviceMotionData::create(acceleration, accelerationIncludingGravity, 157 DeviceMotionData::create(acceleration, accelerationIncludingGravity,
158 rotationRate, intervalProvided, interval); 158 rotationRate, intervalProvided, interval);
159 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData); 159 impl->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData);
160 } 160 }
161 161
162 } // namespace blink 162 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698