diff options
Diffstat (limited to 'WebCore/bindings/v8/custom')
19 files changed, 308 insertions, 30 deletions
diff --git a/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp b/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp index 305fb18..99edc8b 100644 --- a/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp +++ b/WebCore/bindings/v8/custom/V8ArrayBufferCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" @@ -78,4 +78,4 @@ v8::Handle<v8::Value> V8ArrayBuffer::constructorCallback(const v8::Arguments& ar } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.cpp b/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.cpp index 2c89b95..4671c61 100644 --- a/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.cpp +++ b/WebCore/bindings/v8/custom/V8ArrayBufferViewCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "V8ArrayBufferView.h" #include "V8Binding.h" @@ -92,4 +92,4 @@ v8::Handle<v8::Value> V8ArrayBufferView::sliceCallback(const v8::Arguments& args } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp index baffbd4..fc83b61 100644 --- a/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp +++ b/WebCore/bindings/v8/custom/V8ConsoleCustom.cpp @@ -64,7 +64,7 @@ v8::Handle<v8::Value> V8Console::traceCallback(const v8::Arguments& args) Console* imp = V8Console::toNative(args.Holder()); v8::HandleScope handleScope; ScriptState* scriptState = ScriptState::current(); - v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(ScriptCallStack::maxCallStackSizeToCapture); + v8::Local<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(ScriptCallStack::maxCallStackSizeToCapture, ScriptCallStack::stackTraceOptions); OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(scriptState, stackTrace)); imp->trace(callStack.get()); return v8::Handle<v8::Value>(); diff --git a/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp b/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp index 8a39332..caf2e16 100644 --- a/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp +++ b/WebCore/bindings/v8/custom/V8DOMFormDataCustom.cpp @@ -34,11 +34,28 @@ #include "DOMFormData.h" #include "V8Binding.h" #include "V8Blob.h" +#include "V8HTMLFormElement.h" #include "V8Proxy.h" #include "V8Utilities.h" namespace WebCore { +v8::Handle<v8::Value> V8DOMFormData::constructorCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.FormData.Constructor"); + + if (!args.IsConstructCall()) + return throwError("DOM object constructor cannot be called as a function.", V8Proxy::SyntaxError); + + HTMLFormElement* form = 0; + if (args.Length() > 0 && V8HTMLFormElement::HasInstance(args[0])) + form = V8HTMLFormElement::toNative(args[0]->ToObject()); + RefPtr<DOMFormData> domFormData = DOMFormData::create(form); + + V8DOMWrapper::setDOMWrapper(args.Holder(), &info, domFormData.get()); + return toV8(domFormData.release(), args.Holder()); +} + v8::Handle<v8::Value> V8DOMFormData::appendCallback(const v8::Arguments& args) { INC_STATS("DOM.FormData.append()"); diff --git a/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp b/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp index fc8cf98..a44131a 100644 --- a/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp +++ b/WebCore/bindings/v8/custom/V8DirectoryEntryCustom.cpp @@ -70,8 +70,8 @@ v8::Handle<v8::Value> V8DirectoryEntry::getDirectoryCallback(const v8::Arguments flags->setExclusive(isExclusive); } } else { - EXCEPTION_BLOCK(Flags*, tmp_flags, V8Flags::HasInstance(args[1]) ? V8Flags::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0); - flags = tmp_flags; + EXCEPTION_BLOCK(Flags*, tmp_flags, V8Flags::HasInstance(args[1]) ? V8Flags::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0); + flags = tmp_flags; } RefPtr<EntryCallback> successCallback; if (args.Length() > 2 && !args[2]->IsNull() && !args[2]->IsUndefined()) { diff --git a/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp b/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp new file mode 100644 index 0000000..90b3d13 --- /dev/null +++ b/WebCore/bindings/v8/custom/V8DirectoryEntrySyncCustom.cpp @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "V8DirectoryEntrySync.h" + +#if ENABLE(FILE_SYSTEM) + +#include "DirectoryEntrySync.h" +#include "ExceptionCode.h" +#include "V8Binding.h" +#include "V8BindingMacros.h" +#include "V8EntryCallback.h" +#include "V8ErrorCallback.h" +#include "V8FileEntrySync.h" +#include "V8Flags.h" +#include "V8Proxy.h" +#include <wtf/RefCounted.h> +#include <wtf/RefPtr.h> + +namespace WebCore { + +static bool extractBooleanValue(const v8::Handle<v8::Object>& object, const char* name, ExceptionCode& ec) { + ec = 0; + v8::Local<v8::Value> value = object->Get(v8::String::New(name)); + if (!value.IsEmpty() && !isUndefinedOrNull(value)) { + v8::TryCatch block; + bool nativeValue = value->BooleanValue(); + if (block.HasCaught()) { + ec = TYPE_MISMATCH_ERR; + return false; + } + return nativeValue; + } + return false; +} + +static PassRefPtr<Flags> getFlags(const v8::Local<v8::Value>& arg, ExceptionCode& ec) +{ + ec = 0; + if (isUndefinedOrNull(arg) || !arg->IsObject()) + return 0; + if (V8Flags::HasInstance(arg)) + return V8Flags::toNative(v8::Handle<v8::Object>::Cast(arg)); + + v8::Handle<v8::Object> object; + { + v8::TryCatch block; + object = v8::Handle<v8::Object>::Cast(arg); + if (block.HasCaught()) { + ec = TYPE_MISMATCH_ERR; + return 0; + } + } + + bool isCreate = extractBooleanValue(object, "create", ec); + if (ec) + return 0; + bool isExclusive = extractBooleanValue(object, "exclusive", ec); + if (ec) + return 0; + + RefPtr<Flags> flags = Flags::create(); + flags->setCreate(isCreate); + flags->setExclusive(isExclusive); + + return flags; +} + +v8::Handle<v8::Value> V8DirectoryEntrySync::getDirectoryCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.DirectoryEntrySync.getDirectory"); + DirectoryEntrySync* imp = V8DirectoryEntrySync::toNative(args.Holder()); + ExceptionCode ec = 0; + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, path, args[0]); + RefPtr<Flags> flags = getFlags(args[1], ec); + if (UNLIKELY(ec)) { + V8Proxy::setDOMException(ec); + return v8::Handle<v8::Value>(); + } + RefPtr<DirectoryEntrySync> result = imp->getDirectory(path, flags, ec); + if (UNLIKELY(ec)) { + V8Proxy::setDOMException(ec); + return v8::Handle<v8::Value>(); + } + return toV8(result.release()); +} + +v8::Handle<v8::Value> V8DirectoryEntrySync::getFileCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.DirectoryEntrySync.getFile"); + DirectoryEntrySync* imp = V8DirectoryEntrySync::toNative(args.Holder()); + ExceptionCode ec = 0; + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, path, args[0]); + RefPtr<Flags> flags = getFlags(args[1], ec); + if (UNLIKELY(ec)) { + V8Proxy::setDOMException(ec); + return v8::Handle<v8::Value>(); + } + RefPtr<FileEntrySync> result = imp->getFile(path, flags, ec); + if (UNLIKELY(ec)) { + V8Proxy::setDOMException(ec); + return v8::Handle<v8::Value>(); + } + return toV8(result.release()); +} + + + +} // namespace WebCore + +#endif // ENABLE(FILE_SYSTEM) diff --git a/WebCore/bindings/v8/custom/V8ElementCustom.cpp b/WebCore/bindings/v8/custom/V8ElementCustom.cpp index 3f6cd6a..02fc457 100644 --- a/WebCore/bindings/v8/custom/V8ElementCustom.cpp +++ b/WebCore/bindings/v8/custom/V8ElementCustom.cpp @@ -32,7 +32,6 @@ #include "V8Element.h" #include "Attr.h" -#include "CSSHelper.h" #include "Document.h" #include "Element.h" #include "ExceptionCode.h" diff --git a/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp b/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp new file mode 100644 index 0000000..e98df19 --- /dev/null +++ b/WebCore/bindings/v8/custom/V8EntrySyncCustom.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "EntrySync.h" + +#if ENABLE(FILE_SYSTEM) + +#include "V8Attr.h" +#include "V8Binding.h" +#include "V8BindingState.h" +#include "V8DirectoryEntrySync.h" +#include "V8EntrySync.h" +#include "V8FileEntrySync.h" +#include "V8Proxy.h" +#include <wtf/RefPtr.h> + +namespace WebCore { + +v8::Handle<v8::Value> toV8(EntrySync* impl) +{ + if (!impl) + return v8::Null(); + + if (impl->isFile()) + return toV8(static_cast<FileEntrySync*>(impl)); + + ASSERT(impl->isDirectory()); + return toV8(static_cast<DirectoryEntrySync*>(impl)); +} + +} // namespace WebCore + +#endif // ENABLE(FILE_SYSTEM) diff --git a/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp b/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp new file mode 100755 index 0000000..5f4fb57 --- /dev/null +++ b/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "V8FileReader.h" + +#include "ScriptExecutionContext.h" +#include "V8Binding.h" + +namespace WebCore { + +v8::Handle<v8::Value> V8FileReader::constructorCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.FileReader.Constructor"); + + if (!args.IsConstructCall()) + return throwError("DOM object constructor cannot be called as a function.", V8Proxy::TypeError); + + // Expect no parameters. + // Allocate a FileReader object as its internal field. + ScriptExecutionContext* context = getScriptExecutionContext(); + if (!context) + return throwError("FileReader constructor's associated context is not available", V8Proxy::ReferenceError); + RefPtr<FileReader> fileReader = FileReader::create(context); + V8DOMWrapper::setDOMWrapper(args.Holder(), &info, fileReader.get()); + + // Add object to the wrapper map. + fileReader->ref(); + V8DOMWrapper::setJSWrapperForActiveDOMObject(fileReader.get(), v8::Persistent<v8::Object>::New(args.Holder())); + return args.Holder(); +} + +} // namespace WebCore diff --git a/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp index 93c5e91..c3dbe3b 100644 --- a/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Float32ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Float32Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Float32Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp b/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp index 3dffeb5..fd6f1a5 100644 --- a/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp +++ b/WebCore/bindings/v8/custom/V8IDBAnyCustom.cpp @@ -38,6 +38,7 @@ #include "V8IDBIndex.h" #include "V8IDBKey.h" #include "V8IDBObjectStore.h" +#include "V8IDBTransaction.h" namespace WebCore { @@ -55,14 +56,16 @@ v8::Handle<v8::Value> toV8(IDBAny* impl) return toV8(impl->idbCursor()); case IDBAny::IDBDatabaseType: return toV8(impl->idbDatabase()); + case IDBAny::IDBFactoryType: + return toV8(impl->idbFactory()); case IDBAny::IDBIndexType: return toV8(impl->idbIndex()); case IDBAny::IDBKeyType: return toV8(impl->idbKey()); case IDBAny::IDBObjectStoreType: return toV8(impl->idbObjectStore()); - case IDBAny::IDBFactoryType: - return toV8(impl->idbFactory()); + case IDBAny::IDBTransactionType: + return toV8(impl->idbTransaction()); case IDBAny::SerializedScriptValueType: return impl->serializedScriptValue()->deserialize(); } diff --git a/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp index 515af24..244a231 100644 --- a/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Int16ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Int16Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Int16Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp index 46087aa..a5001ed 100644 --- a/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Int32ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Int32Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Int32Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp index f941111..526d83e 100644 --- a/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Int8ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Int8Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Int8Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/WebCore/bindings/v8/custom/V8LocationCustom.cpp index 6068aa2..34c7e28 100644 --- a/WebCore/bindings/v8/custom/V8LocationCustom.cpp +++ b/WebCore/bindings/v8/custom/V8LocationCustom.cpp @@ -31,7 +31,6 @@ #include "config.h" #include "V8Location.h" -#include "CSSHelper.h" #include "Document.h" #include "Frame.h" #include "FrameLoader.h" @@ -283,7 +282,7 @@ v8::Handle<v8::Value> V8Location::reloadCallback(const v8::Arguments& args) return v8::Undefined(); if (!protocolIsJavaScript(frame->loader()->url())) - frame->redirectScheduler()->scheduleRefresh(processingUserGesture()); + frame->navigationScheduler()->scheduleRefresh(); return v8::Undefined(); } diff --git a/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp index 5569253..e3ae263 100644 --- a/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Uint16ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Uint16Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Uint16Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp index c1521cf..6c60283 100644 --- a/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Uint32ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Uint32Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Uint32Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp b/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp index 73f995c..ea9f421 100644 --- a/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp +++ b/WebCore/bindings/v8/custom/V8Uint8ArrayCustom.cpp @@ -30,7 +30,7 @@ #include "config.h" -#if ENABLE(3D_CANVAS) +#if ENABLE(3D_CANVAS) || ENABLE(BLOB) #include "ArrayBuffer.h" #include "Uint8Array.h" @@ -68,4 +68,4 @@ v8::Handle<v8::Value> toV8(Uint8Array* impl) } // namespace WebCore -#endif // ENABLE(3D_CANVAS) +#endif // ENABLE(3D_CANVAS) || ENABLE(BLOB) diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp index 2355d2a..393e544 100644 --- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp +++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp @@ -32,7 +32,7 @@ #include "V8XMLHttpRequest.h" #include "Frame.h" -#include "InspectorController.h" +#include "InspectorInstrumentation.h" #include "V8Binding.h" #include "V8Blob.h" #include "V8DOMFormData.h" @@ -51,10 +51,10 @@ v8::Handle<v8::Value> V8XMLHttpRequest::responseTextAccessorGetter(v8::Local<v8: INC_STATS("DOM.XMLHttpRequest.responsetext._get"); XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder()); ExceptionCode ec = 0; - const ScriptString& text = xmlHttpRequest->responseText(ec); + const String& text = xmlHttpRequest->responseText(ec); if (ec) return throwError(ec); - return text.v8StringOrNull(); + return v8String(text); } v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args) @@ -114,7 +114,7 @@ v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args) INC_STATS("DOM.XMLHttpRequest.send()"); XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder()); - InspectorController::instrumentWillSendXMLHttpRequest(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url()); + InspectorInstrumentation::willSendXMLHttpRequest(xmlHttpRequest->scriptExecutionContext(), xmlHttpRequest->url()); ExceptionCode ec = 0; if (args.Length() < 1) |