[Webkit-unassigned] [Bug 20020] Proposed enhancement to JavaScriptCore API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 29 17:13:47 PDT 2008


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


ggaren at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22256|review?                     |review-
               Flag|                            |




------- Comment #5 from ggaren at apple.com  2008-07-29 17:13 PDT -------
(From update of attachment 22256)
Hi Kevin. Nice additions. We've been talking about this forever -- I'm glad you
finally did it!

As the submit policy says, "Please also add your copyright (name and year) to
the relevant files for changes that are more than 10 lines of code."

+2008-07-12  Kelvin Sherlock  <set EMAIL_ADDRESS environment variable>

Please add your email address to this changelog.

 436  @abstract Convenience method for creating a JavaScript Date Object.

You switched this line between JSObjectMakeArray and JSObjectMakeDate.

 439  @param arguments A JSValue array of data to populate the Array with .
Pass NULL if argumentCount is 0.

Typo: "with ." should be "with.".

+ @param arguments A JSValue array of data to populate the Array with . Pass
NULL if argumentCount is 0.

This is a little controversial. All the other convenience functions you've
added do exactly what their JavaScript constructors do, but this one doesn't.

That said, I think the behavior here is a lot less weird than the behavior of
the JavaScript constructor, so maybe that's OK, but I think we should document
the difference more clearly. 

I would change all the abstracts to read, "Creates a JavaScript X object, as if
by invoking the built-in X constructor." Then, I would change the
JSObjectMakeArray abstract to read, "Creates a JavaScript Array object."
Finally, I would add an @discussion to JSObjectMakeArray that reads, "The
behavior of this function does not exactly match the behavior of the built-in
Array constructor. Specifically, if one argument is supplied, this function
returns an array with one element."

 447  @abstract Convenience method for creating a JavaScript Array Object.

You switched this line between JSObjectMakeArray and JSObjectMakeDate.

 465 JS_EXPORT JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t
argumentCount, const JSValueRef arguments[], JSValueRef *exception);    

You included this declaration and documentation twice.


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



More information about the webkit-unassigned mailing list