RESOLVED FIXED Bug 131186
Web Inspector: JSContext inspection provide a way to opt-out of including Native Call Stacks in Exception traces reported to Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=131186
Summary Web Inspector: JSContext inspection provide a way to opt-out of including Nat...
Joseph Pecoraro
Reported 2014-04-03 15:46:42 PDT
By default JSContext Inspection includes the native call stack above the JSC API boundary when there is a JavaScript exception in the context. For example: @implementation Foo - (void)bar { JSContext *context = [[JSContext alloc] init]; [context evaluateScript:@"var a=;"]; // Throws an exception. } @end A JSContext inspector will see the JS exception stack "(anonymous function)" and the "-[JSContext evaluateScript], -[Foo bar], ..." call frames. Some clients, may not want that. Provide SPI to turn off this behavior, so that only the JS exception stack will be visible. <rdar://problem/16507210>
Attachments
[PATCH] Proposed Fix (8.62 KB, patch)
2014-04-03 15:50 PDT, Joseph Pecoraro
ggaren: review+
ggaren: commit-queue-
[PATCH] For Landing (8.65 KB, patch)
2014-04-03 17:19 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2014-04-03 15:50:10 PDT
Created attachment 228552 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 2 2014-04-03 15:52:17 PDT
Attachment 228552 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/API/JSContextPrivate.h:45: Missing spaces around = [whitespace/operators] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 3 2014-04-03 16:28:52 PDT
Comment on attachment 228552 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=228552&action=review r=me > Source/JavaScriptCore/API/JSContextPrivate.h:46 > +@property > +@discussion Set whether or not the native call stack is included when reporting exceptions. Default value is YES. > +*/ > +@property (setter=_setIncludeNativeCallStackWhenReportingExceptions:) BOOL _includeNativeCallStackWhenReportingExceptions NS_AVAILABLE(10_10, 8_0); > + I think the preferred terminology when it comes to verbs is the infinitive: "setIncludes" instead of "setInclude". c.f. – autosaves – setAutosaves: – setSuppressesIncrementalRendering: – suppressesIncrementalRendering
Joseph Pecoraro
Comment 4 2014-04-03 17:19:32 PDT
Created attachment 228563 [details] [PATCH] For Landing
WebKit Commit Bot
Comment 5 2014-04-03 17:20:25 PDT
Attachment 228563 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/API/JSContextPrivate.h:45: Missing spaces around = [whitespace/operators] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 6 2014-04-03 17:51:19 PDT
Comment on attachment 228563 [details] [PATCH] For Landing Clearing flags on attachment: 228563 Committed r166756: <http://trac.webkit.org/changeset/166756>
Note You need to log in before you can comment on or make changes to this bug.