Closed Bug 540558 Opened 14 years ago Closed 14 years ago

window.InstallTrigger.install exists but won't work (and won't throw error) since 3.6

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect)

defect
Not set
normal

Tracking

(status1.9.2 .4-fixed)

RESOLVED FIXED
mozilla1.9.3a2
Tracking Status
status1.9.2 --- .4-fixed

People

(Reporter: timdream, Assigned: mossop)

References

Details

(Keywords: regression, verified1.9.2)

Attachments

(2 files)

Reproducibly: Always.

Steps:
*) invoke add-on installation by install(), accessed using "window.InstallTrigger.install()" rather than just "InstallTrigger.install()".

Result:
* both ways works perfectly in 3.5, but window.InstallTrigger one failed under 3.6 without throwing any errors. Also, the script follows stop executing.

Note:
Both InstallTrigger object exists (try alert()) in 3.6 and 3.5. 
Quick test by turning off jit (chrome and content) w/o restarting won't fix (should I restart after turning off jit in chrome?)
Attached patch patch rev 1Splinter Review
Turns out I was wrong in bug 475934, we still need to create the native object in this cases. Though I'm not totally sure why it's different for plain InstallTrigger vs. window.InstallTrigger this partial backout does fix it. Added an automated test for good measure.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #422487 - Flags: review?(dveditz)
Blocks: 475934
Comment on attachment 422487 [details] [diff] [review]
patch rev 1

>+++ b/xpinstall/tests/bug540558.html
>+function installCallback(url, status) {
>+  document.getElementById("status").textContent = status;
>+}
>+
>+function startInstall() {
>+  window.InstallTrigger.install({
>+    "Unsigned XPI": "http://example.com/browser/xpinstall/tests/unsigned.xpi"
>+  });
>+}

You define installCallback, but don't use it in the call to install(). Is that some magic in the test harness?

other than that r=dveditz on the installTrigger patch.
Attachment #422487 - Flags: review?(dveditz) → review+
(In reply to comment #2)
> (From update of attachment 422487 [details] [diff] [review])
> >+++ b/xpinstall/tests/bug540558.html
> >+function installCallback(url, status) {
> >+  document.getElementById("status").textContent = status;
> >+}
> >+
> >+function startInstall() {
> >+  window.InstallTrigger.install({
> >+    "Unsigned XPI": "http://example.com/browser/xpinstall/tests/unsigned.xpi"
> >+  });
> >+}
> 
> You define installCallback, but don't use it in the call to install(). Is that
> some magic in the test harness?
> 
> other than that r=dveditz on the installTrigger patch.

No just some cruft I failed to remove when I copied the testcase from a different test. I'll remove it before landing.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs baking]
Target Milestone: --- → mozilla1.9.3a2
Comment on attachment 422487 [details] [diff] [review]
patch rev 1

Would be nice to fix this regression on the branch, should be no risk.
Attachment #422487 - Flags: approval1.9.2.2?
Whiteboard: [needs baking]
Attachment #422487 - Flags: approval1.9.2.2? → approval1.9.2.3?
Comment on attachment 422487 [details] [diff] [review]
patch rev 1

a=beltzner for 1.9.2.4
Attachment #422487 - Flags: approval1.9.2.4? → approval1.9.2.4+
Verified for 1.9.2 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4pre) Gecko/20100412 Namoroka/3.6.4pre (.NET CLR 3.5.30729) using attached testcase. window.InstallTrigger.install works now.
Keywords: verified1.9.2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: