Open Bug 1536444 Opened 7 years ago Updated 3 years ago

Tab crashes when using search and RDM (sessionHistory exception)

Categories

(DevTools :: Responsive Design Mode, defect, P2)

65 Branch
defect

Tracking

(Not tracked)

People

(Reporter: mbalfanz, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [dt-q])

STR:

  • open the site search (cmd+f)
  • start search for something
  • close the search using ESC
  • open RDM and close it again
  • open the search again and start typing

ER:

  • search should behave normal

AR:

  • tab crashes
See Also: → 1313337
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [dt-q]

Note that it may take a number of times through the STR to reproduce this (up to 10 times).

The following exceptions are raised

[Exception... "Method not implemented'Method not implemented' when calling method:
[nsIWebNavigation::sessionHistory]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"
location: "JS frame :: chrome://global/content/elements/browser-custom-element.js ::
construct :: line 1092"  data: no]

construct chrome://global/content/elements/browser-custom-element.js:1092
attributeChangedCallback chrome://global/content/elements/browser-custom-element.js:36
start resource://devtools/client/responsive.html/browser/tunnel.js:177
start resource://devtools/client/responsive.html/browser/swap.js:247
AsyncFunctionNext self-hosted:820

Observations

  1. In devtools/client/responsive.html/browser/tunnel.js we set the "remote" attribute on the outer browser.
  2. toolkit/content/widgets/browser-custom-element.js:26::attributeChangedCallback() detects the change and calls this.destroy() then this.construct().
  3. Control returns back to devtools/client/responsive.html/browser/tunnel.js where we call outer.construct().
  4. The moment we touch this.webNavigation.sessionHistory an NS_ERROR_NOT_IMPLEMENTED exception is raised (this happens the first time in step 2).
  5. In dom/browser-element/BrowserElementParent.jsm:577 we intercept an "oop-frameloader-crashed" but this._frameLoader is now a dead wrapper, which triggers the "Your tab just crashed" error (which is fine because without the dead wrapper error it would still show the tab crashed tab).

The unimplemented this.webNavigation.sessionHistory is at toolkit/components/remotebrowserutils/RemoteWebNavigation.jsm:141. A comment before it says that we need to call it from content.

Push that caused this regression

Bug 1528914 - Tidy the relationship between the doc shell and the pres context. r=qdot
author Emilio Cobos Álvarez <emilio@crisal.io>
Tue, 19 Feb 2019 22:53:40 +0000 (4 weeks ago)

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ab11369b0f9699b1badda1e8f757dc1a6ff159b6&tochange=8ed0dbecf030b172f2f12a7cc9716559c4db241b

Has Regression Range: --- → yes
Has STR: --- → yes
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All

@bradwerth It seems like Emilio's patch somehow causes RDM to attempt to use RemoteWebNavigation.jsm:141::sessionHistory(), which is unimplemented. This then somehow causes the page search to crash the tab... not sure why.

I am starting to suspect this needs to be fixed on the platform side.

Do you have time to take a look and if not then what would you like me to do with it?

Flags: needinfo?(bwerth)

Mike, thanks for investigating this. I'll see if I can fix the tunnel setup/teardown, or the Platform code if necessary.

Assignee: mratcliffe → bwerth
Flags: needinfo?(bwerth)
Assignee: bwerth → nobody
Status: ASSIGNED → NEW
Priority: P1 → P2
Whiteboard: [dt-q] → [rdm-mvp] [dt-q]
Whiteboard: [rdm-mvp] [dt-q] → [dt-q]
See Also: → 1421058
Summary: Tab crashes when using search and RDM → Tab crashes when using search and RDM (sessionHistory exception)
Assignee: nobody → bwerth
Assignee: bwerth → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.