RESOLVED FIXED 59378
WebKit2: Should be able to inspect Web Inspector in Debug Builds
https://bugs.webkit.org/show_bug.cgi?id=59378
Summary WebKit2: Should be able to inspect Web Inspector in Debug Builds
Brian Weinstein
Reported 2011-04-25 16:10:45 PDT
WebKit2: Should be able to inspect Web Inspector in Debug Builds
Attachments
[PATCH] Fix (1.72 KB, patch)
2011-04-25 16:12 PDT, Brian Weinstein
aroben: review-
[PATCH] Fix v2 (1.92 KB, patch)
2011-04-25 16:36 PDT, Brian Weinstein
aroben: review+
Brian Weinstein
Comment 1 2011-04-25 16:12:24 PDT
Created attachment 90984 [details] [PATCH] Fix
Adam Roben (:aroben)
Comment 2 2011-04-25 16:28:10 PDT
Comment on attachment 90984 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=90984&action=review > Source/WebKit2/UIProcess/WebInspectorProxy.cpp:62 > WebPageGroup* WebInspectorProxy::inspectorPageGroup() > { > - static WebPageGroup* pageGroup = WebPageGroup::create("__WebInspectorPageGroup__", false, false).leakRef(); > + static WebPageGroup* pageGroup; > + if (pageGroup) > + return pageGroup; > + > + pageGroup = WebPageGroup::create("__WebInspectorPageGroup__", false, false).leakRef(); > + > +#ifndef NDEBUG > + // Allow developers to inspect the Web Inspector in debug builds. > + pageGroup->preferences()->setDeveloperExtrasEnabled(true); > +#endif > + > return pageGroup; > } I think it would be clearer to add a separate createInspectorPageGroup() helper function that had all the creation code. Then this function could stay simple.
Brian Weinstein
Comment 3 2011-04-25 16:36:23 PDT
Created attachment 91011 [details] [PATCH] Fix v2
Adam Roben (:aroben)
Comment 4 2011-04-25 16:37:46 PDT
Comment on attachment 91011 [details] [PATCH] Fix v2 View in context: https://bugs.webkit.org/attachment.cgi?id=91011&action=review > Source/WebKit2/ChangeLog:9 > + (WebKit::WebInspectorProxy::createInspectorPageGroup): Creates an inspector page group and enables The "WebInspectorProxy::" part of this line is incorrect. > Source/WebKit2/UIProcess/WebInspectorProxy.cpp:50 > +static WebPageGroup* createInspectorPageGroup() > +{ > + WebPageGroup* pageGroup = WebPageGroup::create("__WebInspectorPageGroup__", false, false).leakRef(); You should make this function return a PassRefPtr and put the leakRef at the call site.
Brian Weinstein
Comment 5 2011-04-25 16:43:22 PDT
Landed in r84841.
Note You need to log in before you can comment on or make changes to this bug.