Closed
Bug 748752
Opened 13 years ago
Closed 13 years ago
nsNPAPIPlugin check for private browsing value will not work
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla15
People
(Reporter: jdm, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
922 bytes,
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
>::: dom/plugins/base/nsNPAPIPlugin.cpp
>@@ +2136,5 @@
>> }
>>
>> case NPNVprivateModeBool: {
>> + nsCOMPtr<nsIDocument> doc = GetDocumentFromNPP(npp);
>> + nsCOMPtr<nsPIDOMWindow> domwindow = do_QueryInterface(doc);
>
>This will always be null.
Looks like this should be |domwindow = doc->GetWindow()| instead.
Assignee | ||
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Every other caller of GetDocumentFromNPP null checks, so we should probably do the same.
Assignee | ||
Comment 3•13 years ago
|
||
Attachment #618300 -
Attachment is obsolete: true
Attachment #618300 -
Flags: review?(joshmoz)
Attachment #618516 -
Flags: review?(joshmoz)
Comment on attachment 618516 [details] [diff] [review]
Patch (v2)
Review of attachment 618516 [details] [diff] [review]:
-----------------------------------------------------------------
Is this something a test should have caught? We do have an NPAPI private mode test.
dom/plugins/test/mochitest/test_privatemode.xul
Attachment #618516 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Josh Aas (Mozilla Corporation) from comment #4)
> Comment on attachment 618516 [details] [diff] [review]
> Patch (v2)
>
> Review of attachment 618516 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Is this something a test should have caught? We do have an NPAPI private
> mode test.
>
> dom/plugins/test/mochitest/test_privatemode.xul
I have no idea how to trigger this code in a test...
Assignee | ||
Comment 6•13 years ago
|
||
Target Milestone: --- → mozilla15
Reporter | ||
Comment 7•13 years ago
|
||
The problem existed in the NPN_GetValue code, which is tested by queryPrivateModeState (http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/mochitest/test_privatemode.xul#38). The test as written would pass, since it tests non-PB with qPMS, then tests that entering PB mode triggers an update message for plugin instances via NPN_SetValue (http://mxr.mozilla.org/mozilla-central/source/dom/plugins/test/mochitest/test_privatemode.xul#59). Since it doesn't compare this against the qPMS value, the test doesn't see anything as being wrong. This check should be added to the test, I think.
Reporter | ||
Updated•13 years ago
|
Flags: in-testsuite?
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•13 years ago
|
||
Josh, you said in bug 749795 that you're working on a test for this, right?
Reporter | ||
Comment 10•13 years ago
|
||
Yes.
Reporter | ||
Updated•13 years ago
|
Flags: in-testsuite?
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•