RESOLVED FIXED 111483
Modify log method in DOMActivityLogger
https://bugs.webkit.org/show_bug.cgi?id=111483
Summary Modify log method in DOMActivityLogger
Ankur Taly
Reported 2013-03-05 14:39:03 PST
This patch modifies the "log" method in WebDOMActivityLogger (and V8DOMActivityLogger) so that it takes const WebString& (const String&) arguments instead of const char*, and also takes an additional context handle.
Attachments
Patch (4.66 KB, patch)
2013-03-05 15:24 PST, Ankur Taly
no flags
Patch (4.54 KB, patch)
2013-03-05 18:06 PST, Ankur Taly
no flags
Patch (4.86 KB, patch)
2013-03-06 10:59 PST, Ankur Taly
no flags
Ankur Taly
Comment 1 2013-03-05 15:24:08 PST
WebKit Review Bot
Comment 2 2013-03-05 15:27:54 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Adam Barth
Comment 3 2013-03-05 15:31:00 PST
Comment on attachment 191581 [details] Patch This patch does not explain why you think we should make this change. It only explains what change you're making. I'm skeptical about needing to include the context in the log message. The current context is available in a static from V8 via v8::Context::GetCurrent().
Ankur Taly
Comment 4 2013-03-05 16:52:03 PST
The WebDOMActivityLogger class is overridden on the Chromium side with a log method that marshalls all its arguments and then sends them over to the browser process. This marshaling requires a handle to the current context. The chromium reviewers suggested avoiding using the static v8::context::GetCurent() and instead have the context explicitly passed to the log method. FYI, the link to the chromium patch is: https://codereview.chromium.org/12390076/
Ankur Taly
Comment 5 2013-03-05 18:06:31 PST
Ankur Taly
Comment 6 2013-03-05 18:07:35 PST
I checked again with Matt Perry (OWNER on chrome/renderer/extensions) and it turns out that it is fine to invoke the static getCurrent() in order access the context. I have updated the patch so that it only makes the following change: move const char* arguments of the log methods in WebDOMActivityLogger and V8DOMActvityLogger to const WebString& and const String& respectively.
Adam Barth
Comment 7 2013-03-05 22:53:18 PST
Comment on attachment 191625 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191625&action=review > Source/WebCore/ChangeLog:9 > + https://bugs.webkit.org/show_bug.cgi?id=111483 > + > + Reviewed by NOBODY (OOPS!). > + Please explain why you're making this change in the ChangeLog. > Source/WebCore/ChangeLog:10 > + No new tests (OOPS!). This line will prevent your patch from being landed. You should explain that there are no tests because there is no behavior change.
Adam Barth
Comment 8 2013-03-05 22:53:33 PST
(The patch looks fine otherwise.)
Ankur Taly
Comment 9 2013-03-06 10:59:56 PST
Adam Barth
Comment 10 2013-03-06 14:34:21 PST
Comment on attachment 191795 [details] Patch Thanks.
WebKit Review Bot
Comment 11 2013-03-06 14:58:39 PST
Comment on attachment 191795 [details] Patch Clearing flags on attachment: 191795 Committed r144988: <http://trac.webkit.org/changeset/144988>
WebKit Review Bot
Comment 12 2013-03-06 14:58:43 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.