#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
#include "V8SVGAnimatedString.h"
-#include "V8SVGDocument.h"
#include "V8SVGPoint.h"
-#include "bindings/v8/BindingSecurity.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8ObjectConstructor.h"
}
namespace WebCore {
-const WrapperTypeInfo V8TestSVG::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSVG::domTemplate, V8TestSVG::derefObject, 0, 0, 0, V8TestSVG::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype };
+const WrapperTypeInfo V8TestSVG::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSVG::domTemplate, V8TestSVG::derefObject, 0, 0, 0, V8TestSVG::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
namespace TestSVGV8Internal {
TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
}
-static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "getSVGDocument", "TestSVG", info.Holder(), info.GetIsolate());
- TestSVG* imp = V8TestSVG::toNative(info.Holder());
- if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(exceptionState), exceptionState)) {
- v8SetReturnValueNull(info);
- exceptionState.throwIfNeeded();
- return;
- }
- RefPtr<SVGDocument> result = imp->getSVGDocument(exceptionState);
- if (exceptionState.throwIfNeeded())
- return;
- v8SetReturnValue(info, result.release());
-}
-
-static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
- TestSVGV8Internal::getSVGDocumentMethod(info);
- TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
-}
-
static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestSVG* imp = V8TestSVG::toNative(info.Holder());
return;
}
TestSVG* imp = V8TestSVG::toNative(info.Holder());
- if (info.Length() > 0 && !info[0]->IsUndefined() && !V8SVGPoint::hasInstance(info[0], info.GetIsolate())) {
+ if (info.Length() > 0 && !V8SVGPoint::hasInstance(info[0], info.GetIsolate())) {
exceptionState.throwTypeError("parameter 1 is not of type 'SVGPoint'.");
exceptionState.throwIfNeeded();
return;
};
static const V8DOMConfiguration::MethodConfiguration V8TestSVGMethods[] = {
- {"getSVGDocument", TestSVGV8Internal::getSVGDocumentMethodCallback, 0, 0},
{"mutablePointFunction", TestSVGV8Internal::mutablePointFunctionMethodCallback, 0, 0},
{"immutablePointFunction", TestSVGV8Internal::immutablePointFunctionMethodCallback, 0, 0},
{"immutablePointFunctionTypedef", TestSVGV8Internal::immutablePointFunctionTypedefMethodCallback, 0, 0},