Bug 38366 - Web Inspector: Missing INSPECTOR Guard in Console::lastWMLErrorMessage
Summary: Web Inspector: Missing INSPECTOR Guard in Console::lastWMLErrorMessage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 19:03 PDT by Joseph Pecoraro
Modified: 2010-04-30 20:09 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix 1: Remove Function if !ENABLE(INSPECTOR) (2.05 KB, patch)
2010-04-29 19:09 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix 2: Leave Function but always return "" if !ENABLE(INSPECTOR) (1.32 KB, patch)
2010-04-29 19:10 PDT, Joseph Pecoraro
timothy: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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