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

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

Issue 1019453002: IDL: Add [Custom=CallEpilogue] to eliminate CG special cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix after rebase Created 5 years, 9 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // FIXME: This naming seems broken. 44 // FIXME: This naming seems broken.
45 if (impl->interfaceName() == EventTargetNames::LocalDOMWindow) 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::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); 48 v8::Handle<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)
55 {
56 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode())
57 addHiddenValueToArray(info.GetIsolate(), info.Holder(), info[1], V8Event Target::eventListenerCacheIndex);
58 }
59
60 void V8EventTarget::removeEventListenerMethodEpilogueCustom(const v8::FunctionCa llbackInfo<v8::Value>& info, EventTarget* impl)
61 {
62 if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode())
63 removeHiddenValueFromArray(info.GetIsolate(), info.Holder(), info[1], V8 EventTarget::eventListenerCacheIndex);
64 }
65
54 } // namespace blink 66 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/core/v8/custom/V8HistoryCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698