Closed
Bug 987163
Opened 12 years ago
Closed 11 years ago
Implement Xrays to TypedArray objects
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bholley, Assigned: bholley)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
|
5.67 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
|
4.31 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
|
2.44 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
|
7.69 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
|
2.37 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
|
15.52 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
Part of XrayToJS.
Given that the array contents can be be arbitrary (at least for Arrays), we should consider enforcing some of the same restrictions mentioned in bug 987111 comment 0 (in particular, not returning callables, and enforcing same-origin).
| Assignee | ||
Updated•12 years ago
|
| Assignee | ||
Updated•12 years ago
|
Summary: Implement Xrays to TypedArrays → Implement Xrays to TypedArray objects
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
This should now be ready to land. Doing a final all-platform try push to be sure: https://tbpl.mozilla.org/?tree=Try&rev=47dc2ed0e926
I'm sorry to dump this on you bz, but gabor is out until sometime next week and we're getting near the end of Q2, so I don't want this goal to slip. The patches should be very straightforward (feel free to just skim the test changes).
| Assignee | ||
Comment 3•11 years ago
|
||
The Xray code expects to be able to find the ClassSpec via the JSClass of either
instances or standard prototypes. So in the case where these two objects have
different JSClasses, we need to put the information on both.
Attachment #8438871 -
Flags: review?(luke)
| Assignee | ||
Comment 4•11 years ago
|
||
I realized that the switches are going to be cumbersome for Array stuff, because
we'll have to enumerate each kind of TypedArray as a separate case: statement.
Let's just use |if| so that we can call a helper.
Attachment #8438872 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8438873 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 6•11 years ago
|
||
From now on, if someone wants to expose a TypedArray to content, they should
use Cu.cloneInto.
Attachment #8438874 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8438875 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8438876 -
Flags: review?(bzbarsky)
Updated•11 years ago
|
Attachment #8438871 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 8438872 [details] [diff] [review]
Part 2 - Convert from |switch| statements to |if| statements. v1
Looks like gabor is back, so sending this back to him.
Gabor, this should be pretty quick to review. It's also part of a Q2 goal, so if you have time to review it today I'd appreciate it. :-)
Attachment #8438872 -
Flags: review?(bzbarsky) → review?(gkrizsanits)
| Assignee | ||
Updated•11 years ago
|
Attachment #8438873 -
Flags: review?(bzbarsky) → review?(gkrizsanits)
| Assignee | ||
Updated•11 years ago
|
Attachment #8438874 -
Flags: review?(bzbarsky) → review?(gkrizsanits)
| Assignee | ||
Updated•11 years ago
|
Attachment #8438875 -
Flags: review?(bzbarsky) → review?(gkrizsanits)
| Assignee | ||
Updated•11 years ago
|
Attachment #8438876 -
Flags: review?(bzbarsky) → review?(gkrizsanits)
Updated•11 years ago
|
Attachment #8438872 -
Flags: review?(gkrizsanits) → review+
Updated•11 years ago
|
Attachment #8438873 -
Flags: review?(gkrizsanits) → review+
Updated•11 years ago
|
Attachment #8438874 -
Flags: review?(gkrizsanits) → review+
Updated•11 years ago
|
Attachment #8438875 -
Flags: review?(gkrizsanits) → review+
Comment 10•11 years ago
|
||
Comment on attachment 8438876 [details] [diff] [review]
Part 6 - Implement Xrays for TypedArrays. v1
Review of attachment 8438876 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/wrappers/XrayWrapper.cpp
@@ +54,5 @@
> + key == JSProto_Uint8ClampedArray;
> +#endif
> + bool isTypedArray = key >= JSProto_Int8Array &&
> + key <= JSProto_Uint8ClampedArray;
> + MOZ_ASSERT(isTypedArray == isTypedArraySlow, "Somebody reordered jsprototypes.h!");
Could you also assert that the difference of JSProto_Uint8ClampedArray and JSProto_Int8Array has not changed? Since if someone adds a new type before JSProto_Uint8ClampedArray nothing will alarm without that.
Attachment #8438876 -
Flags: review?(gkrizsanits) → review+
| Assignee | ||
Comment 11•11 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/49ee19d05a74
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/211c785e34bb
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/a8ca188e4c66
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/562536284927
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/bde5933787df
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/4a50fbe99969
https://hg.mozilla.org/mozilla-central/rev/49ee19d05a74
https://hg.mozilla.org/mozilla-central/rev/211c785e34bb
https://hg.mozilla.org/mozilla-central/rev/a8ca188e4c66
https://hg.mozilla.org/mozilla-central/rev/562536284927
https://hg.mozilla.org/mozilla-central/rev/bde5933787df
https://hg.mozilla.org/mozilla-central/rev/4a50fbe99969
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•