| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 Handle<String> SubString(Handle<String> str, | 299 Handle<String> SubString(Handle<String> str, |
| 300 int start, | 300 int start, |
| 301 int end, | 301 int end, |
| 302 PretenureFlag pretenure) { | 302 PretenureFlag pretenure) { |
| 303 CALL_HEAP_FUNCTION(str->GetIsolate(), | 303 CALL_HEAP_FUNCTION(str->GetIsolate(), |
| 304 str->SubString(start, end, pretenure), String); | 304 str->SubString(start, end, pretenure), String); |
| 305 } | 305 } |
| 306 | 306 |
| 307 | 307 |
| 308 Handle<JSObject> Copy(Handle<JSObject> obj) { | |
| 309 Isolate* isolate = obj->GetIsolate(); | |
| 310 CALL_HEAP_FUNCTION(isolate, | |
| 311 isolate->heap()->CopyJSObject(*obj), JSObject); | |
| 312 } | |
| 313 | |
| 314 | |
| 315 Handle<JSObject> DeepCopy(Handle<JSObject> obj) { | |
| 316 Isolate* isolate = obj->GetIsolate(); | |
| 317 CALL_HEAP_FUNCTION(isolate, | |
| 318 obj->DeepCopy(isolate), | |
| 319 JSObject); | |
| 320 } | |
| 321 | |
| 322 | |
| 323 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { | 308 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { |
| 324 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); | 309 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); |
| 325 } | 310 } |
| 326 | 311 |
| 327 | 312 |
| 328 // Wrappers for scripts are kept alive and cached in weak global | 313 // Wrappers for scripts are kept alive and cached in weak global |
| 329 // handles referred from foreign objects held by the scripts as long as | 314 // handles referred from foreign objects held by the scripts as long as |
| 330 // they are used. When they are not used anymore, the garbage | 315 // they are used. When they are not used anymore, the garbage |
| 331 // collector will call the weak callback on the global handle | 316 // collector will call the weak callback on the global handle |
| 332 // associated with the wrapper and get rid of both the wrapper and the | 317 // associated with the wrapper and get rid of both the wrapper and the |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 data->next = prev_next_; | 894 data->next = prev_next_; |
| 910 data->limit = prev_limit_; | 895 data->limit = prev_limit_; |
| 911 #ifdef DEBUG | 896 #ifdef DEBUG |
| 912 handles_detached_ = true; | 897 handles_detached_ = true; |
| 913 #endif | 898 #endif |
| 914 return deferred; | 899 return deferred; |
| 915 } | 900 } |
| 916 | 901 |
| 917 | 902 |
| 918 } } // namespace v8::internal | 903 } } // namespace v8::internal |
| OLD | NEW |