[Webkit-unassigned] [Bug 133531] REGRESSION: Can't change the prototype of the lexical global object (changes the proxy prototype instead)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 5 23:06:00 PDT 2014


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





--- Comment #2 from Jay Freeman (saurik) <saurik at saurik.com>  2014-06-05 23:06:23 PST ---
Geoffrey,

Thanks. That code is very similar to the html file I attached as the URL for this bug (I had mentioned I tried this behavior in Safari and it seems to have always done this).

What I am actually doing in my production code is using JSContextGetGlobalObject to get the global object, and then using JSObjectGetPrototype in a loop to find the top-most prototype, and finally using JSObjectSetPrototype on the final not-NULL result. I can appreciate the idea that "this" is not the same as the lexical global object, but JSContextGetGlobalObject should be the actual global object, no?

Is there some other way I can affect the prototype of the global object? Just copying properties is not viable... the prototype that I install is a custom JS class that implements getProperty to do lookups against an external property source. (Also, one of the main use cases of my code is to be "installed" onto an existing JSGlobalContextRef, which is part of the reason I haven't just changed the global object.)

-- 
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