Changeset 117730 in webkit
- Timestamp:
- May 20, 2012 10:53:42 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117728 r117730 1 2012-05-20 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Pass Isolate to V8Utilities::createFunctionCallback() 4 https://bugs.webkit.org/show_bug.cgi?id=86978 5 6 Reviewed by Adam Barth. 7 8 The objective is to pass Isolate around in V8 bindings. 9 This patch passes Isolate to V8Utilities::createFunctionCallback(). 10 11 No tests. No change in behavior. 12 13 * bindings/v8/V8Utilities.cpp: 14 (WebCore::throwTypeMismatchException): 15 * bindings/v8/V8Utilities.h: 16 (WebCore): 17 (WebCore::createFunctionOnlyCallback): 18 * bindings/v8/custom/V8GeolocationCustom.cpp: 19 (WebCore::V8Geolocation::getCurrentPositionCallback): 20 (WebCore::V8Geolocation::watchPositionCallback): 21 * bindings/v8/custom/V8NotificationCustom.cpp: 22 (WebCore::V8Notification::requestPermissionCallback): 23 1 24 2012-05-20 Kentaro Hara <haraken@chromium.org> 2 25 -
trunk/Source/WebCore/bindings/v8/V8Utilities.cpp
r117536 r117730 203 203 } 204 204 205 void throwTypeMismatchException( )206 { 207 V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17" );205 void throwTypeMismatchException(v8::Isolate* isolate) 206 { 207 V8Proxy::throwError(V8Proxy::GeneralError, "TYPE_MISMATCH_ERR: DOM Exception 17", isolate); 208 208 } 209 209 -
trunk/Source/WebCore/bindings/v8/V8Utilities.h
r112184 r117730 61 61 ScriptExecutionContext* getScriptExecutionContext(); 62 62 63 void throwTypeMismatchException( );63 void throwTypeMismatchException(v8::Isolate*); 64 64 65 65 enum CallbackAllowedValueFlag { … … 91 91 // 'FunctionOnly' is assumed for the created callback. 92 92 template <typename V8CallbackType> 93 PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, CallbackAllowedValueFlags acceptedValues = 0)93 PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, v8::Isolate* isolate, CallbackAllowedValueFlags acceptedValues = 0) 94 94 { 95 95 succeeded = true; … … 103 103 if (!value->IsFunction()) { 104 104 succeeded = false; 105 throwTypeMismatchException( );105 throwTypeMismatchException(isolate); 106 106 return 0; 107 107 } -
trunk/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
r95901 r117730 134 134 bool succeeded = false; 135 135 136 RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded );136 RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded, args.GetIsolate()); 137 137 if (!succeeded) 138 138 return v8::Undefined(); … … 140 140 141 141 // Argument is optional (hence undefined is allowed), and null is allowed. 142 RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);142 RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, args.GetIsolate(), CallbackAllowUndefined | CallbackAllowNull); 143 143 if (!succeeded) 144 144 return v8::Undefined(); … … 160 160 bool succeeded = false; 161 161 162 RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded );162 RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8PositionCallback>(args[0], succeeded, args.GetIsolate()); 163 163 if (!succeeded) 164 164 return v8::Undefined(); … … 166 166 167 167 // Argument is optional (hence undefined is allowed), and null is allowed. 168 RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull);168 RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8PositionErrorCallback>(args[1], succeeded, args.GetIsolate(), CallbackAllowUndefined | CallbackAllowNull); 169 169 if (!succeeded) 170 170 return v8::Undefined(); -
trunk/Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp
r115943 r117730 40 40 41 41 bool succeeded = false; 42 RefPtr<V8NotificationPermissionCallback> callback = createFunctionOnlyCallback<V8NotificationPermissionCallback>(args[0], succeeded );42 RefPtr<V8NotificationPermissionCallback> callback = createFunctionOnlyCallback<V8NotificationPermissionCallback>(args[0], succeeded, args.GetIsolate()); 43 43 if (!succeeded) 44 44 return v8::Undefined();
Note: See TracChangeset
for help on using the changeset viewer.