Closed
Bug 485107
Opened 15 years ago
Closed 15 years ago
Do not throw in NewResolve
Categories
(Toolkit :: Storage, defect)
Toolkit
Storage
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: sdwilsh, Assigned: sdwilsh)
References
Details
Attachments
(1 file, 2 obsolete files)
5.99 KB,
patch
|
Details | Diff | Splinter Review |
We stop following the prototype chain when we throw. Bad storage, bad.
Assignee | ||
Comment 1•15 years ago
|
||
(unless we really really mean to like in http://mxr.mozilla.org/mozilla-central/source/storage/src/mozStorageStatementParams.cpp#202)
Assignee | ||
Comment 2•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs review asuth]
Comment 3•15 years ago
|
||
Is it possible to get a unit test for this? You said we didn't need one on bug 485071#13, but I'm pretty confused about what the current code is breaking. (I had locally rolled a unit test, and I think it passed...) Looking at the XPConnect code, I can see how the change allows the dataflow of the object to subsequent processing, but I don't actually understand it, and the documentation on https://developer.mozilla.org/En/NsIXPCScriptable#newResolve.28.29 is not sufficient to enlighten me. I'm cool if you want to switch the review to :bent or someone to whom it's clear this is the right thing, but I would like a unit test that fails without the change or a pointer to documentation that defines the proper behavior the code is currently failing to meet so that I can be confident without having to read a large portion of the JS/XPC codebase.
Assignee | ||
Comment 4•15 years ago
|
||
With a test. The test failed without this patch, and passes with it. This depends on my fix in bug 489889
Attachment #373962 -
Attachment is obsolete: true
Attachment #374364 -
Flags: review?(bugmail)
Attachment #373962 -
Flags: review?(bugmail)
Assignee | ||
Comment 5•15 years ago
|
||
Comment on attachment 374364 [details] [diff] [review] v1.1 Trying to free up asuth's review queue just a bit.
Attachment #374364 -
Flags: review?(bugmail) → review?(bent.mozilla)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs review asuth] → [needs review bent]
Comment on attachment 374364 [details] [diff] [review] v1.1 >+ if (NS_FAILED(rv)) { >+ // It's highly likely that the name doesn't exist, so let the JS engine >+ // check the prototype chain and throw if that doesn't have the property >+ // either. >+ *_objp = aScopeObj; >+ return NS_OK; >+ } According to mrbkap this causes the JS engine to do extra work. Set *_objp to NULL and return NS_OK. r=me with that.
Attachment #374364 -
Flags: review?(bent.mozilla) → review+
Assignee | ||
Comment 7•15 years ago
|
||
(In reply to comment #6) > According to mrbkap this causes the JS engine to do extra work. Set *_objp to > NULL and return NS_OK. Ugh - one of you told me to do that in the first place :/ Will get a new patch up, and a new bug to fix it in a few other places.
Whiteboard: [needs review bent] → [needs new patch]
Assignee | ||
Comment 8•15 years ago
|
||
I had to refactor the tests just a bit to compensate for the assertion added in bug 489889. Nothing major though, so not getting a new review. This is good to land.
Attachment #374364 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs new patch] → [can land]
Assignee | ||
Comment 9•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c30ed3e7e0ce
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [can land]
Target Milestone: --- → mozilla1.9.2a1
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•