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

Side by Side Diff: src/handles.cc

Issue 23819003: Handlify JSObject::SetAccessor method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/handles.h ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 303
304 Handle<JSObject> DeepCopy(Handle<JSObject> obj) { 304 Handle<JSObject> DeepCopy(Handle<JSObject> obj) {
305 Isolate* isolate = obj->GetIsolate(); 305 Isolate* isolate = obj->GetIsolate();
306 CALL_HEAP_FUNCTION(isolate, 306 CALL_HEAP_FUNCTION(isolate,
307 obj->DeepCopy(isolate), 307 obj->DeepCopy(isolate),
308 JSObject); 308 JSObject);
309 } 309 }
310 310
311 311
312 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) {
313 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object);
314 }
315
316
317 // Wrappers for scripts are kept alive and cached in weak global 312 // Wrappers for scripts are kept alive and cached in weak global
318 // handles referred from foreign objects held by the scripts as long as 313 // handles referred from foreign objects held by the scripts as long as
319 // they are used. When they are not used anymore, the garbage 314 // they are used. When they are not used anymore, the garbage
320 // collector will call the weak callback on the global handle 315 // collector will call the weak callback on the global handle
321 // associated with the wrapper and get rid of both the wrapper and the 316 // associated with the wrapper and get rid of both the wrapper and the
322 // handle. 317 // handle.
323 static void ClearWrapperCache(v8::Isolate* v8_isolate, 318 static void ClearWrapperCache(v8::Isolate* v8_isolate,
324 Persistent<v8::Value>* handle, 319 Persistent<v8::Value>* handle,
325 void*) { 320 void*) {
326 Handle<Object> cache = Utils::OpenPersistent(handle); 321 Handle<Object> cache = Utils::OpenPersistent(handle);
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 data->next = prev_next_; 895 data->next = prev_next_;
901 data->limit = prev_limit_; 896 data->limit = prev_limit_;
902 #ifdef DEBUG 897 #ifdef DEBUG
903 handles_detached_ = true; 898 handles_detached_ = true;
904 #endif 899 #endif
905 return deferred; 900 return deferred;
906 } 901 }
907 902
908 903
909 } } // namespace v8::internal 904 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698