Bug 38366

Summary: Web Inspector: Missing INSPECTOR Guard in Console::lastWMLErrorMessage
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, ryanzhu97, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix 1: Remove Function if !ENABLE(INSPECTOR)
none
[PATCH] Proposed Fix 2: Leave Function but always return "" if !ENABLE(INSPECTOR) timothy: review+, joepeck: commit-queue-

Description Joseph Pecoraro 2010-04-29 19:03:10 PDT
Reported on the webkit-dev mailing list:
https://lists.webkit.org/pipermail/webkit-dev/2010-April/012706.html
Comment 1 Joseph Pecoraro 2010-04-29 19:09:41 PDT
Created attachment 54771 [details]
[PATCH] Proposed Fix 1: Remove Function if !ENABLE(INSPECTOR)

Remove console.lastWMLErrorMessage altogether if INSPECTOR is not enabled.
Comment 2 Joseph Pecoraro 2010-04-29 19:10:43 PDT
Created attachment 54772 [details]
[PATCH] Proposed Fix 2: Leave Function but always return "" if !ENABLE(INSPECTOR)

Leave console.lastWMLErrorMessage but make it non functional unless INSPECTOR is enabled.
Comment 3 Joseph Pecoraro 2010-04-29 19:14:22 PDT
I think this is a weird scenario. Its weird that you can have a WML only function that only works whether or not the Inspector is enabled or not. I think the best current solution would be Proposed Fix 2, so that authors can always rely on console.lastWMLErrorMessage to exist, and not require checking for its existence first.

Can anyone who uses WML comment on its usefulness?
Comment 4 Ryan Zhu 2010-04-29 19:51:23 PDT
Prefer on proposed fix 2.
Thanks
Comment 5 Joseph Pecoraro 2010-04-30 20:09:50 PDT
Committed r58628
	M	WebCore/ChangeLog
	M	WebCore/page/Console.cpp
r58628 = ab352d24008dbb4223c36159bbece5527d0645c8 (refs/remotes/trunk)
http://trac.webkit.org/changeset/58628