[webkit-reviews] review granted: [Bug 119972] Add attributes field to PropertySlot : [Attachment 209036] Fix for JSHistory bug - accidental use of null entry!

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 18 10:19:15 PDT 2013


Geoffrey Garen <ggaren at apple.com> has granted Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 119972: Add attributes field to PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119972

Attachment 209036: Fix for JSHistory bug - accidental use of null entry!
https://bugs.webkit.org/attachment.cgi?id=209036&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=209036&action=review


Hard to tell by reading whether this is correct, but I approve of this
approach, so r=me.

> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:168
>		       JSValue value = thisObject->getStaticValue(exec,
propertyName);
>		       if (value) {
> -			   slot.setValue(thisObject, value);
> +			   slot.setValue(thisObject, ReadOnly | DontEnum,
value);
>			   return true;

I think static values have their own attributes, no?

> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:177
>	       if (OpaqueJSClassStaticFunctionsTable* staticFunctions =
jsClass->staticFunctions(exec)) {
>		   if (staticFunctions->contains(name)) {
> -		       slot.setCustom(thisObject, staticFunctionGetter);
> +		       slot.setCustom(thisObject, ReadOnly | DontEnum,
staticFunctionGetter);
>		       return true;
>		   }

Ditto for static functions.


More information about the webkit-reviews mailing list