WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-57963-20110406195918.patch (text/plain), 4.67 KB, created by
Leandro GraciĆ” Gil
on 2011-04-06 11:59:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Leandro GraciĆ” Gil
Created:
2011-04-06 11:59:19 PDT
Size:
4.67 KB
patch
obsolete
>Subversion Revision: 83080 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a43aa039c8f6e8099fefb2afe7bec4ed89c4576e..d7415bfd06845c5520c38c11dc9ea6b8753b7e80 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,20 @@ > 2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org> > >+ Reviewed by NOBODY (OOPS!). >+ >+ Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version. >+ https://bugs.webkit.org/show_bug.cgi?id=57963 >+ >+ No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html >+ >+ * bindings/v8/V8Utilities.h: >+ (WebCore::createFunctionOnlyCallback): >+ * bindings/v8/custom/V8GeolocationCustom.cpp: >+ (WebCore::V8Geolocation::getCurrentPositionCallback): >+ (WebCore::V8Geolocation::watchPositionCallback): >+ >+2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org> >+ > Reviewed by Steve Block. > > Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore. >diff --git a/Source/WebCore/bindings/v8/V8Utilities.h b/Source/WebCore/bindings/v8/V8Utilities.h >index 6507f619471be83568ace36d5300c3902f01ffe8..4a44f3cd230d118ff1540d50af6fb1d1db75362b 100644 >--- a/Source/WebCore/bindings/v8/V8Utilities.h >+++ b/Source/WebCore/bindings/v8/V8Utilities.h >@@ -58,7 +58,6 @@ namespace WebCore { > void throwTypeMismatchException(); > > enum CallbackAllowedValueFlag { >- CallbackAllowFunction = 0, > CallbackAllowUndefined = 1, > CallbackAllowNull = 1 << 1 > }; >@@ -67,12 +66,14 @@ namespace WebCore { > > // 'FunctionOnly' is assumed for the created callback. > template <typename V8CallbackType> >- PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, CallbackAllowedValueFlags acceptedValues, bool& succeeded) >+ PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, CallbackAllowedValueFlags acceptedValues = 0) > { > succeeded = true; > >- if ((value->IsUndefined() && (acceptedValues & CallbackAllowUndefined)) >- || (value->IsNull() && (acceptedValues & CallbackAllowNull))) >+ if (value->IsUndefined() && (acceptedValues & CallbackAllowUndefined)) >+ return 0; >+ >+ if (value->IsNull() && (acceptedValues & CallbackAllowNull)) > return 0; > > if (!value->IsFunction()) { >diff --git a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp >index 19d1e72140f405dbbebb2fcc669aadf5f88f4b81..91389d82a9ff97c153567211897a143a8e94f4b1 100644 >--- a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp >@@ -133,13 +133,13 @@ v8::Handle<v8::Value> V8Geolocation::getCurrentPositionCallback(const v8::Argume > > bool succeeded = false; > >- RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], CallbackAllowFunction, succeeded); >+ RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], succeeded); > if (!succeeded) > return v8::Undefined(); > ASSERT(positionCallback); > > // Argument is optional (hence undefined is allowed), and null is allowed. >- RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], CallbackAllowUndefined | CallbackAllowNull, succeeded); >+ RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull); > if (!succeeded) > return v8::Undefined(); > >@@ -159,13 +159,13 @@ v8::Handle<v8::Value> V8Geolocation::watchPositionCallback(const v8::Arguments& > > bool succeeded = false; > >- RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], CallbackAllowFunction, succeeded); >+ RefPtr<PositionCallback> positionCallback = createFunctionOnlyCallback<V8CustomPositionCallback>(args[0], succeeded); > if (!succeeded) > return v8::Undefined(); > ASSERT(positionCallback); > > // Argument is optional (hence undefined is allowed), and null is allowed. >- RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], CallbackAllowUndefined | CallbackAllowNull, succeeded); >+ RefPtr<PositionErrorCallback> positionErrorCallback = createFunctionOnlyCallback<V8CustomPositionErrorCallback>(args[1], succeeded, CallbackAllowUndefined | CallbackAllowNull); > if (!succeeded) > return v8::Undefined(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 57963
:
88471
|
88479
|
88491
|
88507