[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
yurys at chromium.org
yurys at chromium.org
Thu Feb 4 21:32:01 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit ff2ddd6adddf4d34a9147a358b9610bfb60eb34e
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 29 09:41:33 2010 +0000
2010-01-29 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Adam Barth.
Remove ScriptState::frame which is only used for reporting exceptions
in some cases in a way that diverges from the regular exception reporting in
v8 bindings.
Cache ScriptState directly on v8::Context instead of providing
implementations specific for isolated worlds and ScriptController.
https://bugs.webkit.org/show_bug.cgi?id=34266
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldScriptState):
* bindings/js/ScriptState.h:
* bindings/v8/ScriptCallStack.cpp:
(WebCore::ScriptCallStack::ScriptCallStack):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::evaluate):
(WebCore::ScriptController::clearWindowShell):
* bindings/v8/ScriptController.h:
* bindings/v8/ScriptScope.cpp:
(WebCore::ScriptScope::ScriptScope):
(WebCore::ScriptScope::success):
* bindings/v8/ScriptScope.h:
* bindings/v8/ScriptState.cpp:
(WebCore::ScriptState::ScriptState):
(WebCore::ScriptState::forContext):
(WebCore::ScriptState::current):
(WebCore::ScriptState::weakReferenceCallback):
(WebCore::mainWorldScriptState):
(WebCore::scriptStateFromPage):
* bindings/v8/ScriptState.h:
(WebCore::ScriptState::ScriptState):
(WebCore::EmptyScriptState::EmptyScriptState):
(WebCore::EmptyScriptState::~EmptyScriptState):
* bindings/v8/V8HiddenPropertyName.h:
* bindings/v8/V8IsolatedContext.cpp:
* bindings/v8/V8IsolatedContext.h:
* bindings/v8/V8Utilities.cpp:
(WebCore::getScriptExecutionContext):
(WebCore::reportException):
* bindings/v8/custom/V8NodeIteratorCustom.cpp:
(WebCore::V8NodeIterator::nextNodeCallback):
(WebCore::V8NodeIterator::previousNodeCallback):
* bindings/v8/custom/V8TreeWalkerCustom.cpp:
(WebCore::V8TreeWalker::parentNodeCallback):
(WebCore::V8TreeWalker::firstChildCallback):
(WebCore::V8TreeWalker::lastChildCallback):
(WebCore::V8TreeWalker::nextNodeCallback):
(WebCore::V8TreeWalker::previousNodeCallback):
(WebCore::V8TreeWalker::nextSiblingCallback):
(WebCore::V8TreeWalker::previousSiblingCallback):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::injectedScriptForNodeId):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9bc095b..4ad3354 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,62 @@
+2010-01-29 Yury Semikhatsky <yurys at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Remove ScriptState::frame which is only used for reporting exceptions
+ in some cases in a way that diverges from the regular exception reporting in
+ v8 bindings.
+
+ Cache ScriptState directly on v8::Context instead of providing
+ implementations specific for isolated worlds and ScriptController.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34266
+
+ * bindings/js/ScriptController.cpp:
+ * bindings/js/ScriptController.h:
+ * bindings/js/ScriptState.cpp:
+ (WebCore::mainWorldScriptState):
+ * bindings/js/ScriptState.h:
+ * bindings/v8/ScriptCallStack.cpp:
+ (WebCore::ScriptCallStack::ScriptCallStack):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::clearWindowShell):
+ * bindings/v8/ScriptController.h:
+ * bindings/v8/ScriptScope.cpp:
+ (WebCore::ScriptScope::ScriptScope):
+ (WebCore::ScriptScope::success):
+ * bindings/v8/ScriptScope.h:
+ * bindings/v8/ScriptState.cpp:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::ScriptState::forContext):
+ (WebCore::ScriptState::current):
+ (WebCore::ScriptState::weakReferenceCallback):
+ (WebCore::mainWorldScriptState):
+ (WebCore::scriptStateFromPage):
+ * bindings/v8/ScriptState.h:
+ (WebCore::ScriptState::ScriptState):
+ (WebCore::EmptyScriptState::EmptyScriptState):
+ (WebCore::EmptyScriptState::~EmptyScriptState):
+ * bindings/v8/V8HiddenPropertyName.h:
+ * bindings/v8/V8IsolatedContext.cpp:
+ * bindings/v8/V8IsolatedContext.h:
+ * bindings/v8/V8Utilities.cpp:
+ (WebCore::getScriptExecutionContext):
+ (WebCore::reportException):
+ * bindings/v8/custom/V8NodeIteratorCustom.cpp:
+ (WebCore::V8NodeIterator::nextNodeCallback):
+ (WebCore::V8NodeIterator::previousNodeCallback):
+ * bindings/v8/custom/V8TreeWalkerCustom.cpp:
+ (WebCore::V8TreeWalker::parentNodeCallback):
+ (WebCore::V8TreeWalker::firstChildCallback):
+ (WebCore::V8TreeWalker::lastChildCallback):
+ (WebCore::V8TreeWalker::nextNodeCallback):
+ (WebCore::V8TreeWalker::previousNodeCallback):
+ (WebCore::V8TreeWalker::nextSiblingCallback):
+ (WebCore::V8TreeWalker::previousSiblingCallback):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::injectedScriptForNodeId):
+
2010-01-29 Darin Fisher <darin at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index ab1d3a6..083e931 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -380,12 +380,6 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
#endif
-ScriptState* ScriptController::mainWorldScriptState()
-{
- JSDOMWindowShell* shell = windowShell(mainThreadNormalWorld());
- return shell->window()->globalExec();
-}
-
JSObject* ScriptController::jsObjectForPluginElement(HTMLPlugInElement* plugin)
{
// Can't create JSObjects when JavaScript is disabled
diff --git a/WebCore/bindings/js/ScriptController.h b/WebCore/bindings/js/ScriptController.h
index f265ab5..f3e5adf 100644
--- a/WebCore/bindings/js/ScriptController.h
+++ b/WebCore/bindings/js/ScriptController.h
@@ -24,7 +24,6 @@
#include "JSDOMWindowShell.h"
#include "ScriptInstance.h"
-#include "ScriptState.h"
#include <runtime/Protect.h>
#include <wtf/RefPtr.h>
@@ -160,8 +159,6 @@ public:
XSSAuditor* xssAuditor() { return m_XSSAuditor.get(); }
- ScriptState* mainWorldScriptState();
-
private:
JSDOMWindowShell* initScript(DOMWrapperWorld* world);
diff --git a/WebCore/bindings/js/ScriptState.cpp b/WebCore/bindings/js/ScriptState.cpp
index 7a760ae..b9f334a 100644
--- a/WebCore/bindings/js/ScriptState.cpp
+++ b/WebCore/bindings/js/ScriptState.cpp
@@ -38,6 +38,12 @@
namespace WebCore {
+ScriptState* mainWorldScriptState(Frame* frame)
+{
+ JSDOMWindowShell* shell = frame->script()->windowShell(mainThreadNormalWorld());
+ return shell->window()->globalExec();
+}
+
ScriptState* scriptStateFromNode(DOMWrapperWorld* world, Node* node)
{
if (!node)
diff --git a/WebCore/bindings/js/ScriptState.h b/WebCore/bindings/js/ScriptState.h
index 6257929..0c7c575 100644
--- a/WebCore/bindings/js/ScriptState.h
+++ b/WebCore/bindings/js/ScriptState.h
@@ -36,6 +36,7 @@
namespace WebCore {
class DOMWrapperWorld;
+ class Frame;
class Node;
class Page;
@@ -45,6 +46,8 @@ namespace WebCore {
// For now, the separation is purely by convention.
typedef JSC::ExecState ScriptState;
+ ScriptState* mainWorldScriptState(Frame*);
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
diff --git a/WebCore/bindings/v8/ScriptCallStack.cpp b/WebCore/bindings/v8/ScriptCallStack.cpp
index a0eeccb..21063ed 100644
--- a/WebCore/bindings/v8/ScriptCallStack.cpp
+++ b/WebCore/bindings/v8/ScriptCallStack.cpp
@@ -55,7 +55,7 @@ ScriptCallStack* ScriptCallStack::create(const v8::Arguments& arguments, unsigne
ScriptCallStack::ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber)
: m_lastCaller(String(), sourceName, sourceLineNumber, arguments, skipArgumentCount)
- , m_scriptState(ScriptController::currentScriptState())
+ , m_scriptState(ScriptState::current())
{
}
diff --git a/WebCore/bindings/v8/ScriptController.cpp b/WebCore/bindings/v8/ScriptController.cpp
index 5d3078d..8db55a1 100644
--- a/WebCore/bindings/v8/ScriptController.cpp
+++ b/WebCore/bindings/v8/ScriptController.cpp
@@ -47,7 +47,6 @@
#include "npruntime_priv.h"
#include "NPV8Object.h"
#include "ScriptSourceCode.h"
-#include "ScriptState.h"
#include "Settings.h"
#include "V8Binding.h"
#include "V8BindingState.h"
@@ -236,7 +235,7 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
v8::Local<v8::Value> object = m_proxy->evaluate(sourceCode, 0);
// Evaluating the JavaScript could cause the frame to be deallocated
- // so we start the keep alive timer here.
+ // so we starot the keep alive timer here.
m_frame->keepAlive();
if (object.IsEmpty() || object->IsUndefined())
@@ -354,24 +353,6 @@ void ScriptController::getAllWorlds(Vector<DOMWrapperWorld*>& worlds)
worlds.append(mainThreadNormalWorld());
}
-ScriptState* ScriptController::mainWorldScriptState()
-{
- if (!m_mainWorldScriptState) {
- v8::HandleScope handleScope;
- m_mainWorldScriptState.set(new ScriptState(m_frame, V8Proxy::mainWorldContext(m_frame)));
- }
- return m_mainWorldScriptState.get();
-}
-
-ScriptState* ScriptController::currentScriptState()
-{
- if (V8IsolatedContext* context = V8IsolatedContext::getEntered())
- return context->scriptState();
- Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
- ASSERT(frame);
- return frame->script()->mainWorldScriptState();
-}
-
static NPObject* createNoScriptObject()
{
notImplemented();
@@ -434,8 +415,6 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
void ScriptController::clearWindowShell()
{
- m_mainWorldScriptState.clear();
-
// V8 binding expects ScriptController::clearWindowShell only be called
// when a frame is loading a new page. V8Proxy::clearForNavigation
// creates a new context for the new page.
diff --git a/WebCore/bindings/v8/ScriptController.h b/WebCore/bindings/v8/ScriptController.h
index ea19d87..b45bdef 100644
--- a/WebCore/bindings/v8/ScriptController.h
+++ b/WebCore/bindings/v8/ScriptController.h
@@ -51,7 +51,6 @@ class Event;
class Frame;
class HTMLPlugInElement;
class ScriptSourceCode;
-class ScriptState;
class String;
class Widget;
class XSSAuditor;
@@ -169,12 +168,6 @@ public:
void evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*) { }
static void getAllWorlds(Vector<DOMWrapperWorld*>& worlds);
- // Script state for the main world context.
- ScriptState* mainWorldScriptState();
-
- // Returns ScriptState for current context.
- static ScriptState* currentScriptState();
-
private:
Frame* m_frame;
const String* m_sourceURL;
@@ -197,9 +190,6 @@ private:
#endif
// The XSSAuditor associated with this ScriptController.
OwnPtr<XSSAuditor> m_XSSAuditor;
-
- // Script state for the main world context.
- OwnPtr<ScriptState> m_mainWorldScriptState;
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/ScriptScope.cpp b/WebCore/bindings/v8/ScriptScope.cpp
index 727ab25..a1b13a1 100644
--- a/WebCore/bindings/v8/ScriptScope.cpp
+++ b/WebCore/bindings/v8/ScriptScope.cpp
@@ -33,10 +33,6 @@
#include "ScriptState.h"
-#include "Document.h"
-#include "Frame.h"
-#include "V8Binding.h"
-
#include <v8.h>
namespace WebCore {
@@ -45,8 +41,8 @@ ScriptScope::ScriptScope(ScriptState* scriptState, bool reportExceptions)
: m_context(scriptState->context())
, m_scope(m_context)
, m_scriptState(scriptState)
- , m_reportExceptions(reportExceptions)
{
+ m_exceptionCatcher.SetVerbose(reportExceptions);
ASSERT(!m_context.IsEmpty());
}
@@ -54,11 +50,6 @@ bool ScriptScope::success()
{
if (!m_exceptionCatcher.HasCaught())
return true;
-
- v8::Local<v8::Message> message = m_exceptionCatcher.Message();
- if (m_reportExceptions)
- m_scriptState->frame()->document()->reportException(toWebCoreString(message->Get()), message->GetLineNumber(), toWebCoreString(message->GetScriptResourceName()));
-
m_exceptionCatcher.Reset();
return false;
}
diff --git a/WebCore/bindings/v8/ScriptScope.h b/WebCore/bindings/v8/ScriptScope.h
index 6fee458..3f9a332 100644
--- a/WebCore/bindings/v8/ScriptScope.h
+++ b/WebCore/bindings/v8/ScriptScope.h
@@ -49,7 +49,6 @@ namespace WebCore {
v8::Context::Scope m_scope;
v8::TryCatch m_exceptionCatcher;
ScriptState* m_scriptState;
- bool m_reportExceptions;
};
}
diff --git a/WebCore/bindings/v8/ScriptState.cpp b/WebCore/bindings/v8/ScriptState.cpp
index 085fd2b..12ed1cb 100644
--- a/WebCore/bindings/v8/ScriptState.cpp
+++ b/WebCore/bindings/v8/ScriptState.cpp
@@ -35,22 +35,22 @@
#include "Node.h"
#include "Page.h"
#include "ScriptController.h"
+#include "V8HiddenPropertyName.h"
+#include <v8.h>
#include <wtf/Assertions.h>
-#include <wtf/StdLibExtras.h>
namespace WebCore {
-ScriptState::ScriptState(Frame* frame)
- : m_frame(frame)
- , m_context(v8::Persistent<v8::Context>::New(V8Proxy::mainWorldContext(frame)))
+ScriptState::ScriptState(Frame*, v8::Handle<v8::Context> context)
+ : m_context(v8::Persistent<v8::Context>::New(context))
{
}
-ScriptState::ScriptState(Frame* frame, v8::Handle<v8::Context> context)
- : m_frame(frame)
- , m_context(v8::Persistent<v8::Context>::New(context))
+ScriptState::ScriptState(v8::Handle<v8::Context> context)
+ : m_context(v8::Persistent<v8::Context>::New(context))
{
+ m_context.MakeWeak(this, &ScriptState::weakReferenceCallback);
}
ScriptState::~ScriptState()
@@ -59,6 +59,49 @@ ScriptState::~ScriptState()
m_context.Clear();
}
+ScriptState* ScriptState::forContext(v8::Local<v8::Context> context)
+{
+ v8::Context::Scope contextScope(context);
+
+ v8::Local<v8::Object> global = context->Global();
+ // Skip proxy object. The proxy object will survive page navigation while we need
+ // an object whose lifetime consides with that of the inspected context.
+ global = v8::Local<v8::Object>::Cast(global->GetPrototype());
+
+ v8::Handle<v8::String> key = V8HiddenPropertyName::scriptState();
+ v8::Local<v8::Value> val = global->GetHiddenValue(key);
+ if (!val.IsEmpty() && val->IsExternal())
+ return static_cast<ScriptState*>(v8::External::Cast(*val)->Value());
+
+ ScriptState* state = new ScriptState(context);
+ global->SetHiddenValue(key, v8::External::New(state));
+ return state;
+}
+
+ScriptState* ScriptState::current()
+{
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = v8::Context::GetCurrent();
+ if (context.IsEmpty()) {
+ ASSERT_NOT_REACHED();
+ return 0;
+ }
+ return ScriptState::forContext(context);
+}
+
+void ScriptState::weakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter)
+{
+ ScriptState* scriptState = static_cast<ScriptState*>(parameter);
+ delete scriptState;
+}
+
+ScriptState* mainWorldScriptState(Frame* frame)
+{
+ v8::HandleScope handleScope;
+ V8Proxy* proxy = frame->script()->proxy();
+ return ScriptState::forContext(proxy->mainWorldContext());
+}
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
{
// This should be never reached with V8 bindings (WebKit only uses it
@@ -70,7 +113,7 @@ ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node* node)
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page* page)
{
// This should be only reached with V8 bindings from single process layout tests.
- return page->mainFrame()->script()->mainWorldScriptState();
+ return mainWorldScriptState(page->mainFrame());
}
}
diff --git a/WebCore/bindings/v8/ScriptState.h b/WebCore/bindings/v8/ScriptState.h
index 8130092..bbb62db 100644
--- a/WebCore/bindings/v8/ScriptState.h
+++ b/WebCore/bindings/v8/ScriptState.h
@@ -44,10 +44,10 @@ namespace WebCore {
class ScriptState : public Noncopyable {
public:
- ScriptState() { }
- ScriptState(Frame* frame);
- ScriptState(Frame* frame, v8::Handle<v8::Context> context);
+ // FIXME: This destructor will become private shortly.
~ScriptState();
+ // FIXME: This constructor will go away shortly.
+ ScriptState(Frame*, v8::Handle<v8::Context>);
bool hadException() { return !m_exception.IsEmpty(); }
void setException(v8::Local<v8::Value> exception)
@@ -56,18 +56,35 @@ namespace WebCore {
}
v8::Local<v8::Value> exception() { return m_exception; }
- Frame* frame() const { return m_frame; }
v8::Local<v8::Context> context() const
{
return v8::Local<v8::Context>::New(m_context);
}
+ static ScriptState* forContext(v8::Local<v8::Context>);
+ static ScriptState* current();
+
+ protected:
+ ScriptState() { }
+
private:
+ friend ScriptState* mainWorldScriptState(Frame*);
+ explicit ScriptState(v8::Handle<v8::Context>);
+
+ static void weakReferenceCallback(v8::Persistent<v8::Value> object, void* parameter);
+
v8::Local<v8::Value> m_exception;
- Frame* m_frame;
v8::Persistent<v8::Context> m_context;
};
+ class EmptyScriptState : public ScriptState {
+ public:
+ EmptyScriptState() : ScriptState() { }
+ ~EmptyScriptState() { }
+ };
+
+ ScriptState* mainWorldScriptState(Frame*);
+
ScriptState* scriptStateFromNode(DOMWrapperWorld*, Node*);
ScriptState* scriptStateFromPage(DOMWrapperWorld*, Page*);
diff --git a/WebCore/bindings/v8/V8HiddenPropertyName.h b/WebCore/bindings/v8/V8HiddenPropertyName.h
index bb1ca4c..0bfadd9 100644
--- a/WebCore/bindings/v8/V8HiddenPropertyName.h
+++ b/WebCore/bindings/v8/V8HiddenPropertyName.h
@@ -39,6 +39,7 @@ namespace WebCore {
V(objectPrototype) \
V(listener) \
V(attributeListener) \
+ V(scriptState) \
V(sleepFunction) \
V(toStringString)
diff --git a/WebCore/bindings/v8/V8IsolatedContext.cpp b/WebCore/bindings/v8/V8IsolatedContext.cpp
index 4db1efe..3237ede 100644
--- a/WebCore/bindings/v8/V8IsolatedContext.cpp
+++ b/WebCore/bindings/v8/V8IsolatedContext.cpp
@@ -89,14 +89,4 @@ V8IsolatedContext::~V8IsolatedContext()
m_context->disposeHandle();
}
-ScriptState* V8IsolatedContext::scriptState()
-{
- if (!m_scriptState) {
- v8::HandleScope scope;
- v8::Handle<v8::Context> context = m_context.get()->get();
- m_scriptState.set(new ScriptState(V8Proxy::retrieveFrame(context), context));
- }
- return m_scriptState.get();
-}
-
} // namespace WebCore
diff --git a/WebCore/bindings/v8/V8IsolatedContext.h b/WebCore/bindings/v8/V8IsolatedContext.h
index 3844b57..70ca270 100644
--- a/WebCore/bindings/v8/V8IsolatedContext.h
+++ b/WebCore/bindings/v8/V8IsolatedContext.h
@@ -94,8 +94,6 @@ public:
IsolatedWorld* world() const { return m_world.get(); }
- ScriptState* scriptState();
-
private:
static v8::Handle<v8::Object> getGlobalObject(v8::Handle<v8::Context> context)
{
@@ -111,9 +109,6 @@ private:
RefPtr<SharedPersistent<v8::Context> > m_context;
RefPtr<IsolatedWorld> m_world;
-
- // FIXME: get rid of redundant m_context field. The context can be retrieved from the ScriptState.
- OwnPtr<ScriptState> m_scriptState;
};
} // namespace WebCore
diff --git a/WebCore/bindings/v8/V8Utilities.cpp b/WebCore/bindings/v8/V8Utilities.cpp
index c547cc7..fb1ecaa 100644
--- a/WebCore/bindings/v8/V8Utilities.cpp
+++ b/WebCore/bindings/v8/V8Utilities.cpp
@@ -134,13 +134,15 @@ ScriptExecutionContext* getScriptExecutionContext(ScriptState* scriptState)
return proxy->workerContext()->scriptExecutionContext();
#endif
- if (scriptState)
- return scriptState->frame()->document()->scriptExecutionContext();
- else {
- Frame* frame = V8Proxy::retrieveFrameForCurrentContext();
- if (frame)
- return frame->document()->scriptExecutionContext();
- }
+ Frame* frame;
+ if (scriptState) {
+ v8::HandleScope handleScope;
+ frame = V8Proxy::retrieveFrame(scriptState->context());
+ } else
+ frame = V8Proxy::retrieveFrameForCurrentContext();
+
+ if (frame)
+ return frame->document()->scriptExecutionContext();
return 0;
}
@@ -170,7 +172,7 @@ void reportException(ScriptState* scriptState, v8::TryCatch& exceptionCatcher)
ScriptExecutionContext* context = getScriptExecutionContext(scriptState);
// During the frame teardown, there may not be a valid context.
if (context && !context->isDocument())
- context->reportException(errorMessage, lineNumber, sourceURL);
+ context->reportException(errorMessage, lineNumber, sourceURL);
exceptionCatcher.Reset();
}
diff --git a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
index 1c077f7..074eac3 100644
--- a/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8NodeIteratorCustom.cpp
@@ -63,7 +63,7 @@ v8::Handle<v8::Value> V8NodeIterator::nextNodeCallback(const v8::Arguments& args
NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
ExceptionCode ec = 0;
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = nodeIterator->nextNode(&state, ec);
return toV8(result.release(), ec, &state);
}
@@ -74,7 +74,7 @@ v8::Handle<v8::Value> V8NodeIterator::previousNodeCallback(const v8::Arguments&
NodeIterator* nodeIterator = V8NodeIterator::toNative(args.Holder());
ExceptionCode ec = 0;
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = nodeIterator->previousNode(&state, ec);
return toV8(result.release(), ec, &state);
}
diff --git a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
index ecf217c..b848197 100644
--- a/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8TreeWalkerCustom.cpp
@@ -60,7 +60,7 @@ v8::Handle<v8::Value> V8TreeWalker::parentNodeCallback(const v8::Arguments& args
INC_STATS("DOM.TreeWalker.parentNode()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->parentNode(&state);
return toV8(result.release(), &state);
}
@@ -70,7 +70,7 @@ v8::Handle<v8::Value> V8TreeWalker::firstChildCallback(const v8::Arguments& args
INC_STATS("DOM.TreeWalker.firstChild()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->firstChild(&state);
return toV8(result.release(), &state);
}
@@ -80,7 +80,7 @@ v8::Handle<v8::Value> V8TreeWalker::lastChildCallback(const v8::Arguments& args)
INC_STATS("DOM.TreeWalker.lastChild()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->lastChild(&state);
return toV8(result.release(), &state);
}
@@ -90,7 +90,7 @@ v8::Handle<v8::Value> V8TreeWalker::nextNodeCallback(const v8::Arguments& args)
INC_STATS("DOM.TreeWalker.nextNode()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->nextNode(&state);
return toV8(result.release(), &state);
}
@@ -100,7 +100,7 @@ v8::Handle<v8::Value> V8TreeWalker::previousNodeCallback(const v8::Arguments& ar
INC_STATS("DOM.TreeWalker.previousNode()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->previousNode(&state);
return toV8(result.release(), &state);
}
@@ -110,7 +110,7 @@ v8::Handle<v8::Value> V8TreeWalker::nextSiblingCallback(const v8::Arguments& arg
INC_STATS("DOM.TreeWalker.nextSibling()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->nextSibling(&state);
return toV8(result.release(), &state);
}
@@ -120,7 +120,7 @@ v8::Handle<v8::Value> V8TreeWalker::previousSiblingCallback(const v8::Arguments&
INC_STATS("DOM.TreeWalker.previousSibling()");
TreeWalker* treeWalker = V8TreeWalker::toNative(args.Holder());
- ScriptState state;
+ EmptyScriptState state;
RefPtr<Node> result = treeWalker->previousSibling(&state);
return toV8(result.release(), &state);
}
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 0c947f7..5ab1354 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -1845,7 +1845,7 @@ ScriptObject InspectorController::injectedScriptForNodeId(long id)
frame = m_inspectedPage->mainFrame();
if (frame)
- return m_injectedScriptHost->injectedScriptFor(frame->script()->mainWorldScriptState());
+ return m_injectedScriptHost->injectedScriptFor(mainWorldScriptState(frame));
return ScriptObject();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list