Closed Bug 1244647 Opened 8 years ago Closed 8 years ago

"Share this page" button doesn't open its popup due to ReferenceError: DOMParser is not defined in microformat-shiv.js

Categories

(Firefox Graveyard :: SocialAPI, defect)

x86_64
Windows 10
defect
Not set
major

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: masayuki, Assigned: mixedpuppy)

References

Details

(Keywords: regression)

Attachments

(1 file)

STR:

1. Launch latest Nightly build
2. Open a web page
3. Click "Share this page" button in the toolbar

Expected Result:

Open popup to choose SNS.

Actual Result:

Popup isn't opened. I see this error in Browser Console at clicking the button:
> ReferenceError: DOMParser is not defined1 microformat-shiv.js:2421:17

This must be a recent regression (I can reproduce this even in safe mode).
Oh, I realized that this may depend on the web page.

I cannot reproduce this with a tab open this page. But I can reproduce this with twitter.com, top page of mxr for mozilla-central.
We're also seeing this with Hello's "Launch new window" button that we currently use in e10s mode. It may also happen in other areas of Hello, but I haven't found anywhere yet.

NI to Shane as he landed what appears to be the regression point.
Flags: needinfo?(mixedpuppy)
looking into this.
Attached patch fix typeof checkSplinter Review
I couldn't replicate the hello breakage, but this fixes share.
Assignee: nobody → mixedpuppy
Flags: needinfo?(mixedpuppy)
Attachment #8714406 - Flags: review?(standard8)
¡Hola Shane!

FWIW I found the Hello bug on Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 ID:20160201030241 CSet: 941033a51983ddec2d99aa9f868a54c0196a4075

Steps:
- Click "Firefox Hello" icon in the tool bar.
- Click "Launch New Window" white on blue button

Expected result:
A new window with e10s disabled and "Firefox Hello" appears.

Actual result:
This shows into the "Browser Console":

    ReferenceError: DOMParser is not defined microformat-shiv.js:2421:17
    ReferenceError: DOMParser is not defined microformat-shiv.js:2421:17
    ReferenceError: DOMParser is not defined microformat-shiv.js:2421:17
    TypeError: metadata is undefined panel.js:1029:9

¡Gracias!
(In reply to Shane Caraveo (:mixedpuppy) from comment #6)
> Created attachment 8714406 [details] [diff] [review]
> fix typeof check
> 
> I couldn't replicate the hello breakage, but this fixes share.

to add some clarity, this patch fixes the problem with DOMParser in microformat-shiv.  I was able to test against share, hello appeared to work just fine.
Comment on attachment 8714406 [details] [diff] [review]
fix typeof check

alternate reviewer perhaps...
Attachment #8714406 - Flags: review?(mdeboer)
Comment on attachment 8714406 [details] [diff] [review]
fix typeof check

Review of attachment 8714406 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the fix, Shane!

::: toolkit/components/microformats/microformat-shiv.js
@@ +2409,5 @@
>  		 *
>           * @return {Object || undefined}
>  		 */
>          getDOMParser: function () {
> +            if (typeof DOMParser === "undefined") {

gosh, this made me smirk a little... just a little.

@@ +4539,5 @@
>      
>      return External;
>      
>      
> +}));

Were these \r's? :-S
Attachment #8714406 - Flags: review?(standard8)
Attachment #8714406 - Flags: review?(mdeboer)
Attachment #8714406 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/3ab3891c0e98
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: