| OLD | NEW |
| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 | 327 |
| 328 | 328 |
| 329 Handle<JSObject> Copy(Handle<JSObject> obj) { | 329 Handle<JSObject> Copy(Handle<JSObject> obj) { |
| 330 Isolate* isolate = obj->GetIsolate(); | 330 Isolate* isolate = obj->GetIsolate(); |
| 331 CALL_HEAP_FUNCTION(isolate, | 331 CALL_HEAP_FUNCTION(isolate, |
| 332 isolate->heap()->CopyJSObject(*obj), JSObject); | 332 isolate->heap()->CopyJSObject(*obj), JSObject); |
| 333 } | 333 } |
| 334 | 334 |
| 335 | 335 |
| 336 Handle<JSObject> DeepCopy(Handle<JSObject> obj) { |
| 337 Isolate* isolate = obj->GetIsolate(); |
| 338 CALL_HEAP_FUNCTION(isolate, |
| 339 Runtime::DeepCopyBoilerplate(isolate, *obj), |
| 340 JSObject); |
| 341 } |
| 342 |
| 343 |
| 336 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { | 344 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { |
| 337 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); | 345 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); |
| 338 } | 346 } |
| 339 | 347 |
| 340 | 348 |
| 341 // Wrappers for scripts are kept alive and cached in weak global | 349 // Wrappers for scripts are kept alive and cached in weak global |
| 342 // handles referred from foreign objects held by the scripts as long as | 350 // handles referred from foreign objects held by the scripts as long as |
| 343 // they are used. When they are not used anymore, the garbage | 351 // they are used. When they are not used anymore, the garbage |
| 344 // collector will call the weak callback on the global handle | 352 // collector will call the weak callback on the global handle |
| 345 // associated with the wrapper and get rid of both the wrapper and the | 353 // associated with the wrapper and get rid of both the wrapper and the |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 data->next = prev_next_; | 936 data->next = prev_next_; |
| 929 data->limit = prev_limit_; | 937 data->limit = prev_limit_; |
| 930 #ifdef DEBUG | 938 #ifdef DEBUG |
| 931 handles_detached_ = true; | 939 handles_detached_ = true; |
| 932 #endif | 940 #endif |
| 933 return deferred; | 941 return deferred; |
| 934 } | 942 } |
| 935 | 943 |
| 936 | 944 |
| 937 } } // namespace v8::internal | 945 } } // namespace v8::internal |
| OLD | NEW |