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

Side by Side Diff: Source/bindings/dart/DartEventListener.h

Issue 24492005: Keep a strong handle to an event listener during handleEvent (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Reupload Created 7 years, 2 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/bindings/dart/DartEventListener.cpp » ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 static EventListener* toNative(Dart_NativeArguments args, int idx, Dart_Hand le& exception) 64 static EventListener* toNative(Dart_NativeArguments args, int idx, Dart_Hand le& exception)
65 { 65 {
66 Dart_Handle object = Dart_GetNativeArgument(args, idx); 66 Dart_Handle object = Dart_GetNativeArgument(args, idx);
67 return toNative(object, exception); 67 return toNative(object, exception);
68 } 68 }
69 69
70 private: 70 private:
71 DartEventListener(); 71 DartEventListener();
72 72
73 static DartEventListener* createOrFetch(Dart_Handle listener); 73 static DartEventListener* createOrFetch(Dart_Handle listener);
74 Dart_Handle callListenerFunction(ScriptExecutionContext*, Dart_Handle dartEv ent, Event*); 74 Dart_Handle callListenerFunction(ScriptExecutionContext*, Dart_Handle listen er, Dart_Handle dartEvent);
75 75
76 static void weakCallback(Dart_WeakPersistentHandle, void* peer); 76 static void weakCallback(Dart_WeakPersistentHandle, void* peer);
77 77
78 Dart_Isolate m_isolate; 78 Dart_Isolate m_isolate;
79 Dart_WeakPersistentHandle m_listener; 79 Dart_WeakPersistentHandle m_listener;
80 // FIXME: investigate why m_worldContext is needed in v8, extensions? 80 // FIXME: investigate why m_worldContext is needed in v8, extensions?
81 }; 81 };
82 82
83 } 83 }
84 84
85 #endif // DartEventListener_h 85 #endif // DartEventListener_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/dart/DartEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698