Title: [101480] trunk/Source/WebCore
- Revision
- 101480
- Author
- [email protected]
- Date
- 2011-11-30 03:30:24 -0800 (Wed, 30 Nov 2011)
Log Message
Remove unused isInlineCode from V8Proxy
https://bugs.webkit.org/show_bug.cgi?id=73341
Patch by Rafael Weinstein <[email protected]> on 2011-11-30
Reviewed by Adam Barth.
No tests needed. This patch only removes unnecessary code.
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::V8Proxy):
(WebCore::V8Proxy::evaluate):
(WebCore::V8Proxy::runScript):
* bindings/v8/V8Proxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101479 => 101480)
--- trunk/Source/WebCore/ChangeLog 2011-11-30 11:28:39 UTC (rev 101479)
+++ trunk/Source/WebCore/ChangeLog 2011-11-30 11:30:24 UTC (rev 101480)
@@ -1,3 +1,20 @@
+2011-11-30 Rafael Weinstein <[email protected]>
+
+ Remove unused isInlineCode from V8Proxy
+ https://bugs.webkit.org/show_bug.cgi?id=73341
+
+ Reviewed by Adam Barth.
+
+ No tests needed. This patch only removes unnecessary code.
+
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::prepareListenerObject):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::V8Proxy):
+ (WebCore::V8Proxy::evaluate):
+ (WebCore::V8Proxy::runScript):
+ * bindings/v8/V8Proxy.h:
+
2011-11-30 Andrew Wason <[email protected]>
Replace Qt QThread threading back-end with pthread/Win32 threading back-ends
Modified: trunk/Source/WebCore/bindings/v8/V8LazyEventListener.cpp (101479 => 101480)
--- trunk/Source/WebCore/bindings/v8/V8LazyEventListener.cpp 2011-11-30 11:28:39 UTC (rev 101479)
+++ trunk/Source/WebCore/bindings/v8/V8LazyEventListener.cpp 2011-11-30 11:30:24 UTC (rev 101480)
@@ -123,7 +123,7 @@
v8::Handle<v8::String> codeExternalString = v8ExternalString(code);
v8::Handle<v8::Script> script = V8Proxy::compileScript(codeExternalString, m_sourceURL, m_position);
if (!script.IsEmpty()) {
- v8::Local<v8::Value> value = proxy->runScript(script, false);
+ v8::Local<v8::Value> value = proxy->runScript(script);
if (!value.IsEmpty()) {
ASSERT(value->IsFunction());
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (101479 => 101480)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-11-30 11:28:39 UTC (rev 101479)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2011-11-30 11:30:24 UTC (rev 101480)
@@ -189,7 +189,6 @@
V8Proxy::V8Proxy(Frame* frame)
: m_frame(frame)
, m_windowShell(V8DOMWindowShell::create(frame))
- , m_inlineCode(false)
{
}
@@ -374,10 +373,7 @@
PlatformSupport::traceEventBegin("v8.run", node, "");
#endif
- // Set inlineCode to true for <a href=""
- // and false for <script>doSomething</script>. We make a rough guess at
- // this based on whether the script source has a URL.
- result = runScript(script, source.url().string().isNull());
+ result = runScript(script);
}
#if PLATFORM(CHROMIUM)
PlatformSupport::traceEventEnd("v8.run", node, "");
@@ -388,7 +384,7 @@
return result;
}
-v8::Local<v8::Value> V8Proxy::runScript(v8::Handle<v8::Script> script, bool isInlineCode)
+v8::Local<v8::Value> V8Proxy::runScript(v8::Handle<v8::Script> script)
{
if (script.IsEmpty())
return notHandledByInterceptor();
@@ -400,11 +396,6 @@
if (handleOutOfMemory())
ASSERT(script.IsEmpty());
- // Save the previous value of the inlineCode flag and update the flag for
- // the duration of the script invocation.
- bool previousInlineCode = inlineCode();
- setInlineCode(isInlineCode);
-
// Keep Frame (and therefore ScriptController and V8Proxy) alive.
RefPtr<Frame> protect(frame());
@@ -431,9 +422,6 @@
if (result.IsEmpty())
return notHandledByInterceptor();
- // Restore inlineCode flag.
- setInlineCode(previousInlineCode);
-
if (v8::V8::IsDead())
handleFatalErrorInV8();
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.h (101479 => 101480)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.h 2011-11-30 11:28:39 UTC (rev 101479)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.h 2011-11-30 11:30:24 UTC (rev 101480)
@@ -143,10 +143,6 @@
void clearForNavigation();
void clearForClose();
- // FIXME: Need comment. User Gesture related.
- bool inlineCode() const { return m_inlineCode; }
- void setInlineCode(bool value) { m_inlineCode = value; }
-
void finishedWithEvent(Event*) { }
// Evaluate _javascript_ in a new isolated world. The script gets its own
@@ -163,7 +159,7 @@
v8::Local<v8::Value> evaluate(const ScriptSourceCode&, Node*);
// Run an already compiled script.
- v8::Local<v8::Value> runScript(v8::Handle<v8::Script>, bool isInlineCode);
+ v8::Local<v8::Value> runScript(v8::Handle<v8::Script>);
// Call the function with the given receiver and arguments.
v8::Local<v8::Value> callFunction(v8::Handle<v8::Function>, v8::Handle<v8::Object>, int argc, v8::Handle<v8::Value> argv[]);
@@ -299,10 +295,6 @@
// For the moment, we have one of these. Soon we will have one per DOMWrapperWorld.
RefPtr<V8DOMWindowShell> m_windowShell;
- // True for <a href="" and false for <script>foo()</script>.
- // Only valid during execution.
- bool m_inlineCode;
-
// All of the extensions registered with the context.
static V8Extensions m_extensions;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes