Bug 152608 - Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._dependencies.has')
Summary: Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._...
Status: RESOLVED DUPLICATE of bug 152497
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-31 00:06 PST by Devin Rousso
Modified: 2016-01-06 12:24 PST (History)
7 users (show)

See Also:


Attachments
WIP-148254.diff (9.96 KB, patch)
2015-12-31 00:06 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2015-12-31 00:06:01 PST
Created attachment 268031 [details]
WIP-148254.diff

-------
Auto-generated details:

Inspected URL:        http://www.apple.com/
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/602.1.15+ (KHTML, like Gecko)
Uncaught exceptions:
 - TypeError: undefined is not an object (evaluating 'this._dependencies.has') (at VisualStylePropertyEditor.js:534:115)
-------

* STEPS TO REPRODUCE
1. Apply the attached "WIP-148254.diff" (was working on https://bugs.webkit.org/show_bug.cgi?id=148254)
2. Open the inspector to the body element on "https://www.apple.com/"
3. Open the Visual Styles sidebar panel in the Elements tab
4. Select Style Rules > This Element
5. Open the Layout > Position section
6. Change the value of the select element next to Type from Static (should be greyed out) to Relative
7. Switch to a different selector under Style Rules (confirm that the yellow warning icons disappear from the other editors in the Position section)
8. Switch back to This Element and change the select element next to Type back to Static
9. Switch to a different selector under Style Rules (confirm that the yellow warning icons reappear from the other editors in the Position section)
At this point, one of two things can happen:
 1) Step 9 will result in an error that crashes the inspector.
 2) Step 9 will work just fine (and continue to do so no matter how many times steps 6-9 are repeated).  In this case, simply open inspector^2 and enter the following command into the console to see the error: `WebInspector.cssStyleDetailsSidebarPanel._visualStyleDetailsPanel._groups.position.properties.zIndex._checkDependencies()`

* NOTES
From what I was able to investigate, it looks like the value of `this` inside the arrow function on UserInterface/Views/VisualStylePropertyEditor.js:531 is simply empty (as in when I tried to console.log() the value inside the arrow function the output in the console was just a blank line).  Maybe an issue with arrow functions?
Comment 1 Radar WebKit Bug Importer 2015-12-31 00:06:17 PST
<rdar://problem/24028126>
Comment 2 BJ Burg 2016-01-01 19:53:42 PST
Happy new year. We ran into this in https://bugs.webkit.org/show_bug.cgi?id=152471 as well. You can convert it to not use arrow functions, and add a FIXME referencing the JSC bug.
Comment 3 BJ Burg 2016-01-06 12:24:31 PST

*** This bug has been marked as a duplicate of bug 152497 ***