Chromium Code Reviews| 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 |