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

Side by Side Diff: Source/bindings/core/v8/custom/V8EventTargetCustom.cpp

Issue 1100893002: Revert of bindings: Do not use ScriptWrappable::wrap for RemoteDOMWindow. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/build/scripts/templates/MakeNames.h.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/EventTargetNames.h" 35 #include "core/EventTargetNames.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 v8::Handle<v8::Value> toV8(EventTarget* impl, v8::Handle<v8::Object> creationCon text, v8::Isolate* isolate) 39 v8::Handle<v8::Value> toV8(EventTarget* impl, v8::Handle<v8::Object> creationCon text, v8::Isolate* isolate)
40 { 40 {
41 if (UNLIKELY(!impl)) 41 if (UNLIKELY(!impl))
42 return v8::Null(isolate); 42 return v8::Null(isolate);
43 43
44 // FIXME: This naming seems broken. 44 // FIXME: This naming seems broken.
45 if (impl->interfaceName() == EventTargetNames::DOMWindow) 45 if (impl->interfaceName() == EventTargetNames::LocalDOMWindow)
46 return toV8(static_cast<DOMWindow*>(impl), creationContext, isolate); 46 return toV8(static_cast<DOMWindow*>(impl), creationContext, isolate);
47 47
48 v8::Local<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 48 v8::Local<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate);
49 if (!wrapper.IsEmpty()) 49 if (!wrapper.IsEmpty())
50 return wrapper; 50 return wrapper;
51 return impl->wrap(creationContext, isolate); 51 return impl->wrap(creationContext, isolate);
52 } 52 }
53 53
54 void V8EventTarget::addEventListenerMethodEpilogueCustom(const v8::FunctionCallb ackInfo<v8::Value>& info, EventTarget* impl) 54 void V8EventTarget::addEventListenerMethodEpilogueCustom(const v8::FunctionCallb ackInfo<v8::Value>& info, EventTarget* impl)
55 { 55 {
56 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode()) 56 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode())
57 addHiddenValueToArray(info.GetIsolate(), info.Holder(), info[1], V8Event Target::eventListenerCacheIndex); 57 addHiddenValueToArray(info.GetIsolate(), info.Holder(), info[1], V8Event Target::eventListenerCacheIndex);
58 } 58 }
59 59
60 void V8EventTarget::removeEventListenerMethodEpilogueCustom(const v8::FunctionCa llbackInfo<v8::Value>& info, EventTarget* impl) 60 void V8EventTarget::removeEventListenerMethodEpilogueCustom(const v8::FunctionCa llbackInfo<v8::Value>& info, EventTarget* impl)
61 { 61 {
62 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode()) 62 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode())
63 removeHiddenValueFromArray(info.GetIsolate(), info.Holder(), info[1], V8 EventTarget::eventListenerCacheIndex); 63 removeHiddenValueFromArray(info.GetIsolate(), info.Holder(), info[1], V8 EventTarget::eventListenerCacheIndex);
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/build/scripts/templates/MakeNames.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698