Chromium Code Reviews| Index: Source/bindings/v8/V8Callback.h |
| diff --git a/Source/bindings/v8/V8Callback.h b/Source/bindings/v8/V8Callback.h |
| index c514f67943128cc48c4cf91b1cb742865a0b0b0c..18c90e046814471322b89eb16e020d80b48d5016 100644 |
| --- a/Source/bindings/v8/V8Callback.h |
| +++ b/Source/bindings/v8/V8Callback.h |
| @@ -52,20 +52,20 @@ typedef unsigned CallbackAllowedValueFlags; |
| // 'FunctionOnly' is assumed for the created callback. |
| template <typename V8CallbackType> |
| -PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, v8::Isolate* isolate, CallbackAllowedValueFlags acceptedValues = 0) |
| +PassOwnPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, v8::Isolate* isolate, CallbackAllowedValueFlags acceptedValues = 0) |
| { |
| succeeded = true; |
| if (value->IsUndefined() && (acceptedValues & CallbackAllowUndefined)) |
| - return 0; |
| + return nullptr; |
|
haraken
2013/11/27 00:37:11
Nit: Do we prefer nullptr to 0 for an OwnPtr? (I'm
adamk
2013/11/27 00:45:21
Only nullptr will work, in fact! OwnPtr's can't be
|
| if (value->IsNull() && (acceptedValues & CallbackAllowNull)) |
| - return 0; |
| + return nullptr; |
| if (!value->IsFunction()) { |
| succeeded = false; |
| setDOMException(TypeMismatchError, isolate); |
| - return 0; |
| + return nullptr; |
| } |
| return V8CallbackType::create(value, getExecutionContext()); |