OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1912 ON_BAILOUT("v8::Object::TurnOnAccessCheck()", return); | 1912 ON_BAILOUT("v8::Object::TurnOnAccessCheck()", return); |
1913 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); | 1913 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); |
1914 | 1914 |
1915 i::Handle<i::Map> new_map = | 1915 i::Handle<i::Map> new_map = |
1916 i::Factory::CopyMapDropTransitions(i::Handle<i::Map>(obj->map())); | 1916 i::Factory::CopyMapDropTransitions(i::Handle<i::Map>(obj->map())); |
1917 new_map->set_is_access_check_needed(true); | 1917 new_map->set_is_access_check_needed(true); |
1918 obj->set_map(*new_map); | 1918 obj->set_map(*new_map); |
1919 } | 1919 } |
1920 | 1920 |
1921 | 1921 |
| 1922 Local<v8::Object> v8::Object::Clone() { |
| 1923 ON_BAILOUT("v8::Object::Clone()", return Local<Object>()); |
| 1924 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 1925 EXCEPTION_PREAMBLE(); |
| 1926 i::Handle<i::JSObject> result = i::Copy(self); |
| 1927 has_pending_exception = result.is_null(); |
| 1928 EXCEPTION_BAILOUT_CHECK(Local<Object>()); |
| 1929 return Utils::ToLocal(result); |
| 1930 } |
| 1931 |
| 1932 |
1922 Local<v8::Object> Function::NewInstance() const { | 1933 Local<v8::Object> Function::NewInstance() const { |
1923 return NewInstance(0, NULL); | 1934 return NewInstance(0, NULL); |
1924 } | 1935 } |
1925 | 1936 |
1926 | 1937 |
1927 Local<v8::Object> Function::NewInstance(int argc, | 1938 Local<v8::Object> Function::NewInstance(int argc, |
1928 v8::Handle<v8::Value> argv[]) const { | 1939 v8::Handle<v8::Value> argv[]) const { |
1929 ON_BAILOUT("v8::Function::NewInstance()", return Local<v8::Object>()); | 1940 ON_BAILOUT("v8::Function::NewInstance()", return Local<v8::Object>()); |
1930 LOG_API("Function::NewInstance"); | 1941 LOG_API("Function::NewInstance"); |
1931 HandleScope scope; | 1942 HandleScope scope; |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3062 reinterpret_cast<HandleScopeImplementer*>(storage); | 3073 reinterpret_cast<HandleScopeImplementer*>(storage); |
3063 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3074 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
3064 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3075 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
3065 &thread_local->handle_scope_data_; | 3076 &thread_local->handle_scope_data_; |
3066 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3077 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
3067 | 3078 |
3068 return storage + ArchiveSpacePerThread(); | 3079 return storage + ArchiveSpacePerThread(); |
3069 } | 3080 } |
3070 | 3081 |
3071 } } // namespace v8::internal | 3082 } } // namespace v8::internal |
OLD | NEW |