WebKit Bugzilla
Attachment 346096 Details for
Bug 188179
: Clarify conversion rules for JSValue property access API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188179-20180730134120.patch (text/plain), 5.64 KB, created by
Keith Miller
on 2018-07-30 13:41:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2018-07-30 13:41:21 PDT
Size:
5.64 KB
patch
obsolete
>Subversion Revision: 234381 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index e972f02002cda08c234251c33c6804178ab7ca8a..04c884bb2c70c5518b6d8bbbcd8919e58dbaf5a1 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,12 @@ >+2018-07-30 Keith Miller <keith_miller@apple.com> >+ >+ Clarify conversion rules for JSValue property access API >+ https://bugs.webkit.org/show_bug.cgi?id=188179 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/JSValue.h: >+ > 2018-07-30 Keith Miller <keith_miller@apple.com> > > Rename some JSC API functions/types. >diff --git a/Source/JavaScriptCore/API/JSValue.h b/Source/JavaScriptCore/API/JSValue.h >index 2c203fb173c826b46b4751fee7740c5a4dc6e88f..552d470cae7113f9886ad81c5401be5991e16ce0 100644 >--- a/Source/JavaScriptCore/API/JSValue.h >+++ b/Source/JavaScriptCore/API/JSValue.h >@@ -326,14 +326,14 @@ typedef id JSValueProperty; > @abstract Access a property of a JSValue. > @result The JSValue for the requested property or the JSValue <code>undefined</code> > if the property does not exist. >-@discussion Corresponds to the JavaScript operation <code>object[property]</code>. Pass an NSString * to access a named property. Other valid properties include symbols, numbers, and stringifiable objects. In macOS 10.13 and iOS 11 and below, 'property' was an NSString *. >+@discussion Corresponds to the JavaScript operation <code>object[property]</code>. After macOS TBA and iOS TBA, 'property' can be any 'id' and will be converted to a JSValue using the conversion rules of <code>valueWithObject:inContext:</code>. Prior to macOS TBA and iOS TBA, 'property' was expected to be an NSString *. > */ > - (JSValue *)valueForProperty:(JSValueProperty)property; > > /*! > @method > @abstract Set a property on a JSValue. >-@discussion Corresponds to the JavaScript operation <code>object[property] = value</code>. Pass an NSString * to access a named property. Other valid properties include symbols, numbers, and stringifiable objects. In macOS 10.13 and iOS 11 and below, 'property' was an NSString *. >+@discussion Corresponds to the JavaScript operation <code>object[property] = value</code>. After macOS TBA and iOS TBA, 'property' can be any 'id' and will be converted to a JSValue using the conversion rules of <code>valueWithObject:inContext:</code>. Prior to macOS TBA and iOS TBA, 'property' was expected to be an NSString *. > */ > - (void)setValue:(id)value forProperty:(JSValueProperty)property; > >@@ -341,7 +341,7 @@ typedef id JSValueProperty; > @method > @abstract Delete a property from a JSValue. > @result YES if deletion is successful, NO otherwise. >-@discussion Corresponds to the JavaScript operation <code>delete object[property]</code>. Pass an NSString * to access a named property. Other valid properties include symbols, numbers, and stringifiable objects. In macOS 10.13 and iOS 11 and below, 'property' was an NSString *. >+@discussion Corresponds to the JavaScript operation <code>delete object[property]</code>. After macOS TBA and iOS TBA, 'property' can be any 'id' and will be converted to a JSValue using the conversion rules of <code>valueWithObject:inContext:</code>. Prior to macOS TBA and iOS TBA, 'property' was expected to be an NSString *. > */ > - (BOOL)deleteProperty:(JSValueProperty)property; > >@@ -350,7 +350,7 @@ typedef id JSValueProperty; > @abstract Check if a JSValue has a property. > @discussion This method has the same function as the JavaScript operator <code>in</code>. > @result Returns YES if property is present on the value. >-@discussion Corresponds to the JavaScript operation <code>property in object</code>. Pass an NSString * to access a named property. Other valid properties include symbols, numbers, and stringifiable objects. In macOS 10.13 and iOS 11 and below, 'property' was an NSString *. >+@discussion Corresponds to the JavaScript operation <code>property in object</code>. After macOS TBA and iOS TBA, 'property' can be any 'id' and will be converted to a JSValue using the conversion rules of <code>valueWithObject:inContext:</code>. Prior to macOS TBA and iOS TBA, 'property' was expected to be an NSString *. > */ > - (BOOL)hasProperty:(JSValueProperty)property; > >@@ -358,8 +358,7 @@ typedef id JSValueProperty; > @method > @abstract Define properties with custom descriptors on JSValues. > @discussion This method may be used to create a data or accessor property on an object. >- This method operates in accordance with the Object.defineProperty method in the >- JavaScript language. Pass an NSString * to access a named property. Other valid properties include symbols, numbers, and stringifiable objects. In macOS 10.13 and iOS 11 and below, 'property' was an NSString *. >+ This method operates in accordance with the Object.defineProperty method in the JavaScript language. After macOS TBA and iOS TBA, 'property' can be any 'id' and will be converted to a JSValue using the conversion rules of <code>valueWithObject:inContext:</code>. Prior to macOS TBA and iOS TBA, 'property' was expected to be an NSString *. > */ > - (void)defineProperty:(JSValueProperty)property descriptor:(id)descriptor; > >@@ -595,8 +594,8 @@ Create a JSValue from a CGRect. > @/textblock > > An object key passed as a subscript will be converted to a JavaScript value, >- and then the value converted to a string used as a property name. In macOS >- 10.13 and iOS 11 and below, the <code>key</code> argument of >+ and then the value using the same rules as <code>valueWithObject:inContext:</code>. In macOS >+ TBA and iOS TBA and below, the <code>key</code> argument of > <code>setObject:object forKeyedSubscript:key</code> was restricted to an > <code>NSString <NSCopying> *</code> but that restriction was never used. > */
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 188179
: 346096