Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp

Issue 873983005: Remove the global event property. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/bindings/core/v8/V8HiddenValue.h ('k') | sky/engine/core/events/EventTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp
diff --git a/sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp b/sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp
index 2863afb2eeed2010521456215fd08444bcebba9c..a8ca332e94d0ec5d82056eb18e960453b1f449eb 100644
--- a/sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp
+++ b/sky/engine/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -40,8 +40,6 @@
#include "sky/engine/bindings/core/v8/ScriptSourceCode.h"
#include "sky/engine/bindings/core/v8/SerializedScriptValue.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
-#include "sky/engine/bindings/core/v8/V8EventListener.h"
-#include "sky/engine/bindings/core/v8/V8EventListenerList.h"
#include "sky/engine/bindings/core/v8/V8GCForContextDispose.h"
#include "sky/engine/bindings/core/v8/V8HiddenValue.h"
#include "sky/engine/core/dom/Element.h"
@@ -137,45 +135,6 @@ static void windowSetTimeoutImpl(const v8::FunctionCallbackInfo<v8::Value>& info
v8SetReturnValue(info, timerId);
}
-void V8Window::eventAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- LocalFrame* frame = V8Window::toNative(info.Holder())->frame();
- ExceptionState exceptionState(ExceptionState::GetterContext, "event", "Window", info.Holder(), info.GetIsolate());
- if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), frame, exceptionState)) {
- exceptionState.throwIfNeeded();
- return;
- }
-
- ASSERT(frame);
- // This is a fast path to retrieve info.Holder()->CreationContext().
- v8::Local<v8::Context> context = toV8Context(frame, DOMWrapperWorld::current(info.GetIsolate()));
- if (context.IsEmpty())
- return;
-
- v8::Handle<v8::Value> jsEvent = V8HiddenValue::getHiddenValue(info.GetIsolate(), context->Global(), V8HiddenValue::event(info.GetIsolate()));
- if (jsEvent.IsEmpty())
- return;
- v8SetReturnValue(info, jsEvent);
-}
-
-void V8Window::eventAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
-{
- LocalFrame* frame = V8Window::toNative(info.Holder())->frame();
- ExceptionState exceptionState(ExceptionState::SetterContext, "event", "Window", info.Holder(), info.GetIsolate());
- if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), frame, exceptionState)) {
- exceptionState.throwIfNeeded();
- return;
- }
-
- ASSERT(frame);
- // This is a fast path to retrieve info.Holder()->CreationContext().
- v8::Local<v8::Context> context = toV8Context(frame, DOMWrapperWorld::current(info.GetIsolate()));
- if (context.IsEmpty())
- return;
-
- V8HiddenValue::setHiddenValue(info.GetIsolate(), context->Global(), V8HiddenValue::event(info.GetIsolate()), value);
-}
-
// FIXME(fqian): returning string is cheating, and we should
// fix this by calling toString function on the receiver.
// However, V8 implements toString in JavaScript, which requires
« no previous file with comments | « sky/engine/bindings/core/v8/V8HiddenValue.h ('k') | sky/engine/core/events/EventTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698