Closed
Bug 1464890
Opened 6 years ago
Closed 6 years ago
Use integers instead of raw pointer values as PRemoteSpellCheck IDs
Categories
(Core :: Spelling checker, defect, P3)
Core
Spelling checker
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
Details
Attachments
(1 file)
2.58 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
RemoteSpellCheckEngineChild uses pointer values from its process as IPDL identifiers, which is causing problems with Web Replay as in a replaying process the pointer values will be reproduced exactly and are unsafe to dereference. The attached patch changes things to use integer identifiers instead.
Attachment #8981230 -
Flags: review?(ehsan)
Updated•6 years ago
|
Component: General → Spelling checker
Comment 1•6 years ago
|
||
Comment on attachment 8981230 [details] [diff] [review]
patch
Review of attachment 8981230 [details] [diff] [review]:
-----------------------------------------------------------------
::: extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp
@@ +58,3 @@
> }
> + mResponsePromises[aId] = nullptr;
> + while (mResponsePromises.Length() && !mResponsePromises.LastElement()) {
Hmm, is the loop condition right here? It seems to me that if aId points to the last element in mResponsePromises, this loop would do the wrong thing, because in the first iteration, mResponsePromises.LastElement() would return nullptr and we would never enter the body of the loop.
r=me with this fixed or explained in case I'm missing something.
Attachment #8981230 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to :Ehsan Akhgari from comment #1)
> Comment on attachment 8981230 [details] [diff] [review]
> patch
>
> Review of attachment 8981230 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp
> @@ +58,3 @@
> > }
> > + mResponsePromises[aId] = nullptr;
> > + while (mResponsePromises.Length() && !mResponsePromises.LastElement()) {
>
> Hmm, is the loop condition right here? It seems to me that if aId points to
> the last element in mResponsePromises, this loop would do the wrong thing,
> because in the first iteration, mResponsePromises.LastElement() would return
> nullptr and we would never enter the body of the loop.
>
> r=me with this fixed or explained in case I'm missing something.
The loop condition tests !mResponsePromises.LastElement(), so we should only enter the loop and remove old entries if the last entry has been null'ed out.
Updated•6 years ago
|
Priority: -- → P3
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff3c10d0cc05
Use integers instead of raw pointer values as PRemoteSpellCheck IDs, r=ehsan.
Comment 4•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
Assignee: nobody → bhackett1024
Updated•6 years ago
|
status-firefox62:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•