Commit 4acdb5e
Give v8::Eternal a direct reference to the handle.
This makes it more similar to other handle types (like PersistentBase),
by simply storing an i::Object** cast to T*. This means that it is not
necessary to look up the handle in the eternal handles table to access
the underlying value.
Like the built-in roots (null, etc.), an eternal handle can never be
destroyed, so we don't even need to allocate a separate local handle.
Instead, the Local<T> can point directly at the eternal reference.
This makes Eternal<T>::Get trivial.
Review-Url: https://codereview.chromium.org/2751263003
Cr-Commit-Position: refs/heads/master@{#43912}1 parent 7bd0c1d commit 4acdb5e
2 files changed
Lines changed: 16 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
365 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
| 374 | + | |
376 | 375 | | |
377 | 376 | | |
378 | 377 | | |
| |||
7673 | 7672 | | |
7674 | 7673 | | |
7675 | 7674 | | |
7676 | | - | |
7677 | | - | |
7678 | | - | |
7679 | | - | |
| 7675 | + | |
7680 | 7676 | | |
7681 | 7677 | | |
7682 | 7678 | | |
| |||
8641 | 8637 | | |
8642 | 8638 | | |
8643 | 8639 | | |
8644 | | - | |
| 8640 | + | |
| 8641 | + | |
8645 | 8642 | | |
8646 | 8643 | | |
8647 | 8644 | | |
8648 | 8645 | | |
8649 | | - | |
| 8646 | + | |
| 8647 | + | |
| 8648 | + | |
8650 | 8649 | | |
8651 | 8650 | | |
8652 | 8651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
952 | | - | |
| 951 | + | |
953 | 952 | | |
954 | 953 | | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
962 | 958 | | |
963 | 959 | | |
964 | 960 | | |
| |||
0 commit comments