[webkit-reviews] review denied: [Bug 80992] Web Inspector: provide a way to reload page with given script preprocessor. : [Attachment 133806] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 26 08:39:46 PDT 2012


Yury Semikhatsky <yurys at chromium.org> has denied Pavel Feldman
<pfeldman at chromium.org>'s request for review:
Bug 80992: Web Inspector: provide a way to reload page with given script
preprocessor.
https://bugs.webkit.org/show_bug.cgi?id=80992

Attachment 133806: Patch
https://bugs.webkit.org/attachment.cgi?id=133806&action=review

------- Additional Comments from Yury Semikhatsky <yurys at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=133806&action=review


> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:63
> +    ScriptPreprocessor(const String& preprocessorScript)

Should be explicit.

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:70
> +	   m_utilityContext = v8::Context::New(0, globalTemplate);

Should be just m_utilityContext = v8::Context::New();

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:74
> +	   v8::Local<v8::Context> context =
v8::Local<v8::Context>::New(m_utilityContext);

No need to wrap it into a local handle, just pass m_utilityContext to the Scope
constructor below.

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:78
> +	   tryCatch.SetVerbose(true);

Note that this wouldn't make any effect as you don't add any message handlers
to the utility isolate.

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:109
> +	   tryCatch.SetVerbose(true);

Same here, we may want to propagate the exceptions to the consonle agent.

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:115
> +	       v8::String::Utf8Value utf8Value(resultValue);

Does it always return UTF-8, not UTF-16?

> Source/WebCore/bindings/v8/ScriptDebugServer.cpp:126
> +	       if (!m_utilityContext.IsEmpty()) {

You should probably also dispose m_preprocessorFunction here.

> Source/WebCore/bindings/v8/ScriptDebugServer.h:132
> +    static bool s_isCompilingInjectedScript;

This field should be per isolate, not static, otherwise it will break workers.


More information about the webkit-reviews mailing list