Closed
Bug 771929
Opened 12 years ago
Closed 12 years ago
[OS.File] (de)serialize integers
Categories
(Toolkit Graveyard :: OS.File, enhancement)
Toolkit Graveyard
OS.File
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla17
People
(Reporter: Yoric, Assigned: Yoric)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
A number of js-ctypes integer types cannot be passed between threads.
We need to implement (de)serialization of these types.
Assignee | ||
Updated•12 years ago
|
Component: Networking: File → OS.File
Product: Core → Toolkit
Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → dteller
Attachment #649599 -
Flags: review?(nfroyd)
Comment 2•12 years ago
|
||
Comment on attachment 649599 [details] [diff] [review]
Communicating numbers
Review of attachment 649599 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/osfile/osfile_shared_allthreads.jsm
@@ +490,5 @@
> + IntType.prototype.toMsg = function toMsg(value) {
> + if (typeof value == "number") {
> + return value;
> + }
> + return this.project(value);
This is just trying to parse non-number things to numbers, correct? Or will it do interesting things with Int64 values and the like?
Comment 3•12 years ago
|
||
Comment on attachment 649599 [details] [diff] [review]
Communicating numbers
Review of attachment 649599 [details] [diff] [review]:
-----------------------------------------------------------------
Clearing r? just to make my queue tidy. Feel free to flip it back on tomorrow--and get the blocking patches for this one checked in!
Attachment #649599 -
Flags: review?(nfroyd)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Nathan Froyd (:froydnj) from comment #2)
> Comment on attachment 649599 [details] [diff] [review]
> Communicating numbers
>
> Review of attachment 649599 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: toolkit/components/osfile/osfile_shared_allthreads.jsm
> @@ +490,5 @@
> > + IntType.prototype.toMsg = function toMsg(value) {
> > + if (typeof value == "number") {
> > + return value;
> > + }
> > + return this.project(value);
>
> This is just trying to parse non-number things to numbers, correct? Or will
> it do interesting things with Int64 values and the like?
For the moment, the only "interesting" thing it will do with Int64/UInt64 is throw an error if they do not fit in a JavaScript number.
Assignee | ||
Comment 5•12 years ago
|
||
Which, I should add, is by design. Without this |toMsg|, any attempt to communicate a [U]Int64 between workers will raise a weird DOM error without a line number. I prefer having a clean error, and the possibility to extend this at some point, once need arises.
Comment 6•12 years ago
|
||
(In reply to David Rajchenbach Teller from comment #5)
> Which, I should add, is by design. Without this |toMsg|, any attempt to
> communicate a [U]Int64 between workers will raise a weird DOM error without
> a line number. I prefer having a clean error, and the possibility to extend
> this at some point, once need arises.
I think that's a reasonable strategy, especially given that 64-bit integers are going to be uncommon.
Assignee | ||
Updated•12 years ago
|
Attachment #649599 -
Flags: review?(nfroyd)
Updated•12 years ago
|
Attachment #649599 -
Flags: review?(nfroyd) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #649599 -
Attachment is obsolete: true
Attachment #653036 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Depends on: 776259
Keywords: checkin-needed
Comment 8•12 years ago
|
||
Green on Try.
https://tbpl.mozilla.org/?tree=Try&rev=f4c4e1566e9b
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9a8c6ac4f16
David, I'm pretty sure you're running most of your patches through Try these days (yay!). If it's not too much trouble, can you please post a link to your most recent run when requesting checkin? It'll save build resources and get your patches checked in faster. Myself and the other sheriffs are trying to clamp down on landing patches without Try results, so if I don't see them in a bug, I'm running the patch through Try myself before landing. Thanks!
Flags: in-testsuite?
Keywords: checkin-needed
Comment 9•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•