| Index: Source/bindings/v8/V8Binding.cpp
|
| diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
|
| index 2d8da03d149da659eb13c671735f449d1a70ce70..45e6beffc7eb3a58c6f65e8e8b797bd7ed7456d6 100644
|
| --- a/Source/bindings/v8/V8Binding.cpp
|
| +++ b/Source/bindings/v8/V8Binding.cpp
|
| @@ -137,6 +137,18 @@ PassRefPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value> callback, v8::Isolate*
|
| return filter.release();
|
| }
|
|
|
| +DOMWindow* toNativeDOMWindow(v8::Handle<v8::Value> value, v8::Isolate* isolate)
|
| +{
|
| + if (value.IsEmpty() || !value->IsObject())
|
| + return 0;
|
| +
|
| + v8::Handle<v8::Object> global = v8::Handle<v8::Object>::Cast(value);
|
| + v8::Handle<v8::Object> windowWrapper = global->FindInstanceInPrototypeChain(V8Window::domTemplate(isolate, worldType(isolate)));
|
| + if (windowWrapper.IsEmpty())
|
| + return 0;
|
| + return V8Window::toNative(windowWrapper);
|
| +}
|
| +
|
| const int32_t kMaxInt32 = 0x7fffffff;
|
| const int32_t kMinInt32 = -kMaxInt32 - 1;
|
| const uint32_t kMaxUInt32 = 0xffffffff;
|
|
|