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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8GeolocationCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp b/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
index e4a011c1b9fd9084baf86475532926a6b901b8a7..611a9ed82931b3bd35416661e93670d0ab697053 100644
--- a/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8DeviceMotionEventCustom.cpp
@@ -37,31 +37,31 @@ namespace {
PassRefPtrWillBeRawPtr<DeviceMotionData::Acceleration> readAccelerationArgument(v8::Local<v8::Value> value, v8::Isolate* isolate)
{
if (isUndefinedOrNull(value))
- return 0;
+ return nullptr;
// Given the test above, this will always yield an object.
v8::Local<v8::Object> object = value->ToObject();
v8::Local<v8::Value> xValue = object->Get(v8AtomicString(isolate, "x"));
if (xValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideX = !isUndefinedOrNull(xValue);
double x = xValue->NumberValue();
v8::Local<v8::Value> yValue = object->Get(v8AtomicString(isolate, "y"));
if (yValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideY = !isUndefinedOrNull(yValue);
double y = yValue->NumberValue();
v8::Local<v8::Value> zValue = object->Get(v8AtomicString(isolate, "z"));
if (zValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideZ = !isUndefinedOrNull(zValue);
double z = zValue->NumberValue();
if (!canProvideX && !canProvideY && !canProvideZ)
- return 0;
+ return nullptr;
return DeviceMotionData::Acceleration::create(canProvideX, x, canProvideY, y, canProvideZ, z);
}
@@ -69,31 +69,31 @@ PassRefPtrWillBeRawPtr<DeviceMotionData::Acceleration> readAccelerationArgument(
PassRefPtrWillBeRawPtr<DeviceMotionData::RotationRate> readRotationRateArgument(v8::Local<v8::Value> value, v8::Isolate* isolate)
{
if (isUndefinedOrNull(value))
- return 0;
+ return nullptr;
// Given the test above, this will always yield an object.
v8::Local<v8::Object> object = value->ToObject();
v8::Local<v8::Value> alphaValue = object->Get(v8AtomicString(isolate, "alpha"));
if (alphaValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideAlpha = !isUndefinedOrNull(alphaValue);
double alpha = alphaValue->NumberValue();
v8::Local<v8::Value> betaValue = object->Get(v8AtomicString(isolate, "beta"));
if (betaValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideBeta = !isUndefinedOrNull(betaValue);
double beta = betaValue->NumberValue();
v8::Local<v8::Value> gammaValue = object->Get(v8AtomicString(isolate, "gamma"));
if (gammaValue.IsEmpty())
- return 0;
+ return nullptr;
bool canProvideGamma = !isUndefinedOrNull(gammaValue);
double gamma = gammaValue->NumberValue();
if (!canProvideAlpha && !canProvideBeta && !canProvideGamma)
- return 0;
+ return nullptr;
return DeviceMotionData::RotationRate::create(canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
}
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/bindings/v8/custom/V8GeolocationCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698