Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: Source/bindings/v8/ScriptString.cpp

Issue 16925002: XMLHttpRequest#responseText should use a rope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/ScriptString.h ('k') | Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptString.cpp
diff --git a/Source/modules/quota/StorageErrorCallback.cpp b/Source/bindings/v8/ScriptString.cpp
similarity index 71%
copy from Source/modules/quota/StorageErrorCallback.cpp
copy to Source/bindings/v8/ScriptString.cpp
index f8c89ad5750929757d407c61279800da6946c18b..8b674dde730222f18696c389d520eb3f08a02283 100644
--- a/Source/modules/quota/StorageErrorCallback.cpp
+++ b/Source/bindings/v8/ScriptString.cpp
@@ -29,26 +29,27 @@
*/
#include "config.h"
-
-#include "modules/quota/StorageErrorCallback.h"
-
-#include "DOMException.h"
-#include "core/dom/DOMCoreException.h"
+#include "bindings/v8/ScriptString.h"
namespace WebCore {
-StorageErrorCallback::CallbackTask::CallbackTask(PassRefPtr<StorageErrorCallback> callback, ExceptionCode ec)
- : m_callback(callback)
- , m_ec(ec)
+ScriptString ScriptString::concatenateWith(const String& string)
{
+ v8::HandleScope handleScope;
+ v8::Handle<v8::String> b = v8String(string, v8::Isolate::GetCurrent())
+ if (hasNoValue())
+ return ScriptString(b);
+ v8::Handle<v8::String> a = v8::Handle<v8::String>::Cast(v8Value());
+ return ScriptString(v8::String::Concat(a, ));
jamesr 2013/06/13 05:49:36 (a, b), i presume? :)
abarth-chromium 2013/06/13 05:56:12 Yes. As I said, I haven't tried compiling it. :)
}
-void StorageErrorCallback::CallbackTask::performTask(ScriptExecutionContext*)
+String ScriptString::toString() const
{
- if (!m_callback)
- return;
- ExceptionCodeDescription description(m_ec);
- m_callback->handleEvent(DOMCoreException::create(description).get());
+ if (hasNoValue())
+ return String();
+ v8::HandleScope handleScope;
+ v8::Handle<v8::String> value = v8::Handle<v8::String>::Cast(v8Value());
+ return v8StringToWebCoreString<String>(value, Externalize);
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/ScriptString.h ('k') | Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698