OLD | NEW |
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 Loading... |
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 |
OLD | NEW |