Bug 126018 - Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: ERROR: TypeError: undefined is not a function (evaluating 'representedObject.saveIdentityToCookie(candidateObjectCookie)')
Summary: Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: ERROR: TypeErro...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
Depends on:
Reported: 2013-12-19 14:14 PST by Joseph Pecoraro
Modified: 2013-12-19 17:56 PST (History)
8 users (show)

See Also:

[PATCH] Proposed Fix (3.89 KB, patch)
2013-12-19 14:53 PST, Joseph Pecoraro
eflews.bot: commit-queue-
Details | Formatted Diff | Diff
[PATCH] Proposed Fix (4.81 KB, patch)
2013-12-19 17:01 PST, 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 2013-12-19 14:14:06 PST
file:///Volumes/Data/Build/Debug/WebInspectorUI.framework/Resources/NavigationSidebarPanel.js:582:51:JS ERROR: TypeError: undefined is not a function (evaluating 'representedObject.saveIdentityToCookie(candidateObjectCookie)')

1. Open Inspector for <http://bogojoker.com>
2. Inspect the Inspector (I typically do by the Resources Sidebar)
  => Exception in console, inspector² is broken
Comment 1 Joseph Pecoraro 2013-12-19 14:19:28 PST
Seems like the issue crops up when the item I have selected in the Resources Navigation sidebar is a FolderTreeElement, like "Scripts".
Comment 2 Joseph Pecoraro 2013-12-19 14:23:08 PST

All new WebInspector.FolderTreeElement's are passed a representedObject of null or undefined. Eventually in TreeElement, that becomes just an empty object:

    this.representedObject = (representedObject || {});

Which is what I'm seeing here.
Comment 3 Joseph Pecoraro 2013-12-19 14:53:10 PST
Created attachment 219685 [details]
[PATCH] Proposed Fix
Comment 4 EFL EWS Bot 2013-12-19 16:56:39 PST
Comment on attachment 219685 [details]
[PATCH] Proposed Fix

Attachment 219685 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/50568041
Comment 5 Joseph Pecoraro 2013-12-19 17:01:31 PST
Created attachment 219706 [details]
[PATCH] Proposed Fix

On IRC the feedback was we should still be resilient against a missing representedObject.saveIdentityToCookie. So I added the if check, and console.error warn if it didn't exist.
Comment 6 WebKit Commit Bot 2013-12-19 17:56:56 PST
Comment on attachment 219706 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 219706

Committed r160888: <http://trac.webkit.org/changeset/160888>
Comment 7 WebKit Commit Bot 2013-12-19 17:56:58 PST
All reviewed patches have been landed.  Closing bug.