[Webkit-unassigned] [Bug 57760] Factorizing the creation of 'FunctionOnly' callbacks in V8

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 4 09:54:58 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57760





--- Comment #2 from Steve Block <steveblock at google.com>  2011-04-04 09:54:58 PST ---
(From update of attachment 88069)
View in context: https://bugs.webkit.org/attachment.cgi?id=88069&action=review

Do you have a bug to do the same for JSC?

> Source/WebCore/bindings/v8/V8Utilities.h:58
> +    void throwTypeMismatchException();

Now that the call-sites have been unified, there's probably no need for this to be a function - you can just call throwError() directly.

> Source/WebCore/bindings/v8/V8Utilities.h:61
> +    PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, bool allowUndefined, bool allowNull)

It's usual to have the out param last. Also, an enum would be much easier to read than a pair of bools for allowUndefined and allowNull.

> Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp:-68
> -    // Argument is optional (hence undefined is allowed), and null is allowed.

Would be good to preserve this comment at the call-site of createFunctionOnlyCallback().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list