Bug 148190 - Web Inspector: Uncaught Exceptions regarding PseudoElements / TemplateContent
Summary: Web Inspector: Uncaught Exceptions regarding PseudoElements / TemplateContent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-08-19 14:00 PDT by Joseph Pecoraro
Modified: 2015-09-01 11:14 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.04 KB, patch)
2015-08-19 14:01 PDT, Joseph Pecoraro
bburg: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (3.00 KB, patch)
2015-08-19 17:02 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-08-19 14:00:03 PDT
* SUMMARY
Uncaught Exceptions regarding PseudoElements / TemplateContent.

* STEPS TO REPRODUCE
1. Inspect twitter.com
2. Navigate around twitter.com
3. Reload
  => uncaught exceptions in inspector

* ERRORS
Resources/Protocol/InspectorBackend.js:281:26: CONSOLE ERROR Uncaught exception in inspector page while handling event DOM.pseudoElementRemoved:  TypeError: null is not an object (evaluating 'this._children.length') _renumber@WebInspectorUI.framework/Resources/Models/DOMNode.js:559:44
Resources/Protocol/InspectorBackend.js:281:26: CONSOLE ERROR Uncaught exception in inspector page while handling event DOM.childNodeRemoved:  TypeError: node.templateContent is not a function. (In 'node.templateContent()', 'node.templateContent' is undefined) _unbind@WebInspectorUI.framework/Resources/Controllers/DOMTreeManager.js:292:33
Comment 1 Joseph Pecoraro 2015-08-19 14:01:29 PDT
Created attachment 259402 [details]
[PATCH] Proposed Fix
Comment 2 BJ Burg 2015-08-19 14:06:41 PDT
Comment on attachment 259402 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=259402&action=review

r=me

> Source/WebInspectorUI/ChangeLog:14
> +        exists, it may be null. So separate the two pathes.

paths*

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:289
> +        for (let i = 0; node.children && i < node.children.length; ++i)

This could be for (let .. of ..), since it doesn't mutate node.children.

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:296
> +        let pseudoElements = node.pseudoElements();

No need for a local.
Comment 3 Joseph Pecoraro 2015-08-19 17:02:11 PDT
Created attachment 259430 [details]
[PATCH] For Landing
Comment 4 WebKit Commit Bot 2015-08-19 17:37:30 PDT
Comment on attachment 259430 [details]
[PATCH] For Landing

Clearing flags on attachment: 259430

Committed r188670: <http://trac.webkit.org/changeset/188670>
Comment 5 Joseph Pecoraro 2015-09-01 11:14:34 PDT
This landed, see above comment.