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..317c53bd154f26d9d648641e391af885efa5fbd4 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, b)); |
} |
-void StorageErrorCallback::CallbackTask::performTask(ScriptExecutionContext*) |
+String ScriptString::flattenToString() 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 |