Bug 143556 - Exception in console and broken right click after attempting to show context menu in Inspector
Summary: Exception in console and broken right click after attempting to show context ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-08 22:27 PDT by Joseph Pecoraro
Modified: 2015-04-08 23:35 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.12 KB, patch)
2015-04-08 22:29 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-04-08 22:27:24 PDT
* SUMMARY
When I run Safari and right click it produces an exception and right click stops working.

* STEPS TO REPRODUCE
1. Run Safari
2. Inspect a web page
3. Right click blank space in the navigation sidebar in the inspector
  => EXCEPTION in system console

Apr  8 21:37:35 pecoraro.apple.com Safari[81152] <Warning>: *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Apr  8 21:37:35 pecoraro.apple.com Safari[81152] <Warning>: (
	0   CoreFoundation  __exceptionPreprocess + 172
	1   libobjc.A.dylib objc_exception_throw + 43
	2   CoreFoundation  -[__NSArrayM insertObject:atIndex:] + 1033
	3   AppKit          -[NSMenu insertItem:atIndex:] + 487
	4   WebKit          _ZN6WebKitL14populateNSMenuEP6NSMenuRKN3WTF6VectorINS2_9RetainPtrI10NSMenuItemEELm0ENS2_15CrashOnOverflowEEE + 94
	5   WebKit          _ZN6WebKit22WebContextMenuProxyMac8populateERKN3WTF6VectorINS1_6RefPtrINS_18WebContextMenuItemEEELm0ENS1_15CrashOnOverflowEEERKNS_22ContextMenuContextDataE + 465
...

* NOTES
- Seems to be a nil ContextMenu item, we should gracefully handle a null ContextMenuItem::shareMenuItem
Comment 1 Joseph Pecoraro 2015-04-08 22:27:50 PDT
<rdar://problem/20478205>
Comment 2 Joseph Pecoraro 2015-04-08 22:29:22 PDT
Created attachment 250417 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2015-04-08 22:31:58 PDT
Not sure how to write a test for this. Point me in the right direction and I'll give it a shot!
Comment 4 WebKit Commit Bot 2015-04-08 23:35:03 PDT
Comment on attachment 250417 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 250417

Committed r182590: <http://trac.webkit.org/changeset/182590>
Comment 5 WebKit Commit Bot 2015-04-08 23:35:07 PDT
All reviewed patches have been landed.  Closing bug.