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

Side by Side Diff: src/api.cc

Issue 118374: Introduce an API to force the deletion of a property ignoring... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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 | « include/v8.h ('k') | src/handles.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 self, 1884 self,
1885 key_obj, 1885 key_obj,
1886 value_obj, 1886 value_obj,
1887 static_cast<PropertyAttributes>(attribs)); 1887 static_cast<PropertyAttributes>(attribs));
1888 has_pending_exception = obj.is_null(); 1888 has_pending_exception = obj.is_null();
1889 EXCEPTION_BAILOUT_CHECK(false); 1889 EXCEPTION_BAILOUT_CHECK(false);
1890 return true; 1890 return true;
1891 } 1891 }
1892 1892
1893 1893
1894 bool v8::Object::ForceDelete(v8::Handle<Value> key) {
1895 ON_BAILOUT("v8::Object::ForceDelete()", return false);
1896 ENTER_V8;
1897 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
1898 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
1899 EXCEPTION_PREAMBLE();
1900 i::Handle<i::Object> obj = i::ForceDeleteProperty(self, key_obj);
1901 has_pending_exception = obj.is_null();
1902 EXCEPTION_BAILOUT_CHECK(false);
1903 return obj->IsTrue();
1904 }
1905
1906
1894 Local<Value> v8::Object::Get(v8::Handle<Value> key) { 1907 Local<Value> v8::Object::Get(v8::Handle<Value> key) {
1895 ON_BAILOUT("v8::Object::Get()", return Local<v8::Value>()); 1908 ON_BAILOUT("v8::Object::Get()", return Local<v8::Value>());
1896 ENTER_V8; 1909 ENTER_V8;
1897 i::Handle<i::Object> self = Utils::OpenHandle(this); 1910 i::Handle<i::Object> self = Utils::OpenHandle(this);
1898 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key); 1911 i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
1899 EXCEPTION_PREAMBLE(); 1912 EXCEPTION_PREAMBLE();
1900 i::Handle<i::Object> result = i::GetProperty(self, key_obj); 1913 i::Handle<i::Object> result = i::GetProperty(self, key_obj);
1901 has_pending_exception = result.is_null(); 1914 has_pending_exception = result.is_null();
1902 EXCEPTION_BAILOUT_CHECK(Local<Value>()); 1915 EXCEPTION_BAILOUT_CHECK(Local<Value>());
1903 return Utils::ToLocal(result); 1916 return Utils::ToLocal(result);
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 reinterpret_cast<HandleScopeImplementer*>(storage); 3501 reinterpret_cast<HandleScopeImplementer*>(storage);
3489 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3502 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3490 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3503 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3491 &thread_local->handle_scope_data_; 3504 &thread_local->handle_scope_data_;
3492 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3505 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3493 3506
3494 return storage + ArchiveSpacePerThread(); 3507 return storage + ArchiveSpacePerThread();
3495 } 3508 }
3496 3509
3497 } } // namespace v8::internal 3510 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698