You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a5c973b
Browse filesBrowse the repository at this point in the historyBrowse files
fix: let only the instance JS is constructing take its object id
While JS constructs a Java object, the native side publishes the id it
reserved in Runtime.currentObjectId, and the binding's initInstance takes
it. Any other binding instance whose initInstance ran in that window took
the same id: an instance Java created there (by reflection, or a custom
view inflated by the constructor) was registered under the outer id, and
since bindings now carry their id, its callbacks ran on the outer object's
JS. The class being constructed is now published with the id, and only an
instance of exactly that class takes it, once; others get their own JS
object as Java-created instances do.
The scope also restored -1 instead of the enclosing construction's id when
a callback made by a constructor constructed another object. It now
restores the enclosing id and class. The class is written only when it
changes, so constructing one class repeatedly costs the same two field
writes as before.
0 commit comments