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

Side by Side Diff: include/v8.h

Issue 3011009: Add a check that weak object handle is not in NEAR_DEATH state after weak callback invocation. (Closed)
Patch Set: Addressing Mads' comments Created 10 years, 5 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
« no previous file with comments | « no previous file | src/global-handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 } 131 }
132 132
133 133
134 // --- W e a k H a n d l e s 134 // --- W e a k H a n d l e s
135 135
136 136
137 /** 137 /**
138 * A weak reference callback function. 138 * A weak reference callback function.
139 * 139 *
140 * This callback should either explicitly invoke Dispose on |object| if
141 * V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWeak.
142 *
140 * \param object the weak global object to be reclaimed by the garbage collector 143 * \param object the weak global object to be reclaimed by the garbage collector
141 * \param parameter the value passed in when making the weak global object 144 * \param parameter the value passed in when making the weak global object
142 */ 145 */
143 typedef void (*WeakReferenceCallback)(Persistent<Value> object, 146 typedef void (*WeakReferenceCallback)(Persistent<Value> object,
144 void* parameter); 147 void* parameter);
145 148
146 149
147 // --- H a n d l e s --- 150 // --- H a n d l e s ---
148 151
149 #define TYPE_CHECK(T, S) \ 152 #define TYPE_CHECK(T, S) \
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3604 3607
3605 3608
3606 } // namespace v8 3609 } // namespace v8
3607 3610
3608 3611
3609 #undef V8EXPORT 3612 #undef V8EXPORT
3610 #undef TYPE_CHECK 3613 #undef TYPE_CHECK
3611 3614
3612 3615
3613 #endif // V8_H_ 3616 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698