Reviewed by Eric Seidel.
Remove unused parameter related to XSSAuditor
https://bugs.webkit.org/show_bug.cgi?id=53862
* WebCore.exp.in:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/ScriptControllerBase.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluate):
(WebCore::ScriptController::executeScriptInWorld):
* bindings/js/ScriptController.h:
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::evaluate):
* bindings/v8/ScriptController.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77755
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-02-05 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Remove unused parameter related to XSSAuditor
+ https://bugs.webkit.org/show_bug.cgi?id=53862
+
+ * WebCore.exp.in:
+ * bindings/ScriptControllerBase.cpp:
+ (WebCore::ScriptController::executeScript):
+ (WebCore::ScriptController::executeIfJavaScriptURL):
+ * bindings/ScriptControllerBase.h:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::evaluate):
+ (WebCore::ScriptController::executeScriptInWorld):
+ * bindings/js/ScriptController.h:
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::evaluate):
+ * bindings/v8/ScriptController.h:
+
2011-02-05 Adam Barth <abarth@webkit.org>
Fix Qt build.
__ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore16ScriptController10initScriptEPNS_15DOMWrapperWorldE
__ZN7WebCore16ScriptController11createWorldEv
-__ZN7WebCore16ScriptController13executeScriptERKN3WTF6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController13executeScriptERKN3WTF6StringEb
__ZN7WebCore16ScriptController17canExecuteScriptsENS_33ReasonForCallingCanExecuteScriptsE
__ZN7WebCore16ScriptController18windowScriptObjectEv
-__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKN3WTF6StringEbNS_14ShouldAllowXSSE
+__ZN7WebCore16ScriptController20executeScriptInWorldEPNS_15DOMWrapperWorldERKN3WTF6StringEb
__ZN7WebCore16ScriptController24jsObjectForPluginElementEPNS_17HTMLPlugInElementE
__ZN7WebCore16ThreadGlobalData10staticDataE
__ZN7WebCore16ThreadGlobalDataC1Ev
return allowed;
}
-ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture, ShouldAllowXSS shouldAllowXSS)
+ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture)
{
- return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_frame->document()->url()), shouldAllowXSS);
+ return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_frame->document()->url()));
}
-ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode, ShouldAllowXSS shouldAllowXSS)
+ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode)
{
if (!canExecuteScripts(AboutToExecuteScript) || isPaused())
return ScriptValue();
bool wasInExecuteScript = m_inExecuteScript;
m_inExecuteScript = true;
- ScriptValue result = evaluate(sourceCode, shouldAllowXSS);
+ ScriptValue result = evaluate(sourceCode);
if (!wasInExecuteScript) {
m_inExecuteScript = false;
const int javascriptSchemeLength = sizeof("javascript:") - 1;
String decodedURL = decodeURLEscapeSequences(url.string());
- ScriptValue result = executeScript(decodedURL.substring(javascriptSchemeLength), false, AllowXSS);
+ ScriptValue result = executeScript(decodedURL.substring(javascriptSchemeLength), false);
// If executing script caused this frame to be removed from the page, we
// don't want to try to replace its document!
NotAboutToExecuteScript
};
-// FIXME: Remove this enum and all references to it.
-enum ShouldAllowXSS {
- AllowXSS,
- DoNotAllowXSS
-};
-
-} // namespace WebCore
+}
-#endif // ScriptControllerBase_h
+#endif
return windowShell;
}
-ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld* world, ShouldAllowXSS)
+ScriptValue ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld* world)
{
const SourceCode& jsSourceCode = sourceCode.jsSourceCode();
String sourceURL = ustringToString(jsSourceCode.provider()->url());
return JSValue();
}
-ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode, ShouldAllowXSS shouldAllowXSS)
+ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
- return evaluateInWorld(sourceCode, mainThreadNormalWorld(), shouldAllowXSS);
+ return evaluateInWorld(sourceCode, mainThreadNormalWorld());
}
PassRefPtr<DOMWrapperWorld> ScriptController::createWorld()
#endif
}
-ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture, ShouldAllowXSS shouldAllowXSS)
+ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture)
{
ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->document()->url());
bool wasInExecuteScript = m_inExecuteScript;
m_inExecuteScript = true;
- ScriptValue result = evaluateInWorld(sourceCode, world, shouldAllowXSS);
+ ScriptValue result = evaluateInWorld(sourceCode, world);
if (!wasInExecuteScript) {
m_inExecuteScript = false;
static void getAllWorlds(Vector<DOMWrapperWorld*>&);
- ScriptValue executeScript(const ScriptSourceCode&, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
- ScriptValue executeScript(const String& script, bool forceUserGesture = false, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
- ScriptValue executeScriptInWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture = false, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
+ ScriptValue executeScript(const ScriptSourceCode&);
+ ScriptValue executeScript(const String& script, bool forceUserGesture = false);
+ ScriptValue executeScriptInWorld(DOMWrapperWorld*, const String& script, bool forceUserGesture = false);
// Returns true if argument is a JavaScript URL.
bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
// Darwin is an exception to this rule: it is OK to call this function from any thread, even reentrantly.
static void initializeThreading();
- ScriptValue evaluate(const ScriptSourceCode&, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
- ScriptValue evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
+ ScriptValue evaluate(const ScriptSourceCode&);
+ ScriptValue evaluateInWorld(const ScriptSourceCode&, DOMWrapperWorld*);
int eventHandlerLineNumber() const;
}
// Evaluate a script file in the environment of this proxy.
-ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode, ShouldAllowXSS)
+ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
{
String sourceURL = sourceCode.url();
const String* savedSourceURL = m_sourceURL;
// or this accessor should be made JSProxy*
V8Proxy* proxy() { return m_proxy.get(); }
- ScriptValue executeScript(const ScriptSourceCode&, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
- ScriptValue executeScript(const String& script, bool forceUserGesture = false, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
+ ScriptValue executeScript(const ScriptSourceCode&);
+ ScriptValue executeScript(const String& script, bool forceUserGesture = false);
// Returns true if argument is a JavaScript URL.
bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptURL shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL);
// Evaluate a script file in the environment of this proxy.
// If succeeded, 'succ' is set to true and result is returned
// as a string.
- ScriptValue evaluate(const ScriptSourceCode&, ShouldAllowXSS shouldAllowXSS = DoNotAllowXSS);
+ ScriptValue evaluate(const ScriptSourceCode&);
void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&);