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

Side by Side Diff: src/runtime.cc

Issue 23600011: Handlify JSObject::DeleteHiddenProperty 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/objects.cc ('k') | no next file » | 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 14138 matching lines...) Expand 10 before | Expand all | Expand 10 after
14149 // Capture a simple stack trace for the stack property. 14149 // Capture a simple stack trace for the stack property.
14150 return *isolate->CaptureSimpleStackTrace(error_object, caller, limit); 14150 return *isolate->CaptureSimpleStackTrace(error_object, caller, limit);
14151 } 14151 }
14152 14152
14153 14153
14154 // Retrieve the stack trace. This is the raw stack trace that yet has to 14154 // Retrieve the stack trace. This is the raw stack trace that yet has to
14155 // be formatted. Since we only need this once, clear it afterwards. 14155 // be formatted. Since we only need this once, clear it afterwards.
14156 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetAndClearOverflowedStackTrace) { 14156 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetAndClearOverflowedStackTrace) {
14157 HandleScope scope(isolate); 14157 HandleScope scope(isolate);
14158 ASSERT_EQ(args.length(), 1); 14158 ASSERT_EQ(args.length(), 1);
14159 CONVERT_ARG_CHECKED(JSObject, error_object, 0); 14159 CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0);
14160 String* key = isolate->heap()->hidden_stack_trace_string(); 14160 Handle<String> key = isolate->factory()->hidden_stack_trace_string();
14161 Object* result = error_object->GetHiddenProperty(key); 14161 Handle<Object> result(error_object->GetHiddenProperty(*key), isolate);
14162 if (result->IsTheHole()) return isolate->heap()->undefined_value(); 14162 if (result->IsTheHole()) return isolate->heap()->undefined_value();
14163 RUNTIME_ASSERT(result->IsJSArray() || result->IsUndefined()); 14163 RUNTIME_ASSERT(result->IsJSArray() || result->IsUndefined());
14164 error_object->DeleteHiddenProperty(key); 14164 JSObject::DeleteHiddenProperty(error_object, key);
14165 return result; 14165 return *result;
14166 } 14166 }
14167 14167
14168 14168
14169 // Returns V8 version as a string. 14169 // Returns V8 version as a string.
14170 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetV8Version) { 14170 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetV8Version) {
14171 SealHandleScope shs(isolate); 14171 SealHandleScope shs(isolate);
14172 ASSERT_EQ(args.length(), 0); 14172 ASSERT_EQ(args.length(), 0);
14173 14173
14174 const char* version_string = v8::V8::GetVersion(); 14174 const char* version_string = v8::V8::GetVersion();
14175 14175
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
14695 // Handle last resort GC and make sure to allow future allocations 14695 // Handle last resort GC and make sure to allow future allocations
14696 // to grow the heap without causing GCs (if possible). 14696 // to grow the heap without causing GCs (if possible).
14697 isolate->counters()->gc_last_resort_from_js()->Increment(); 14697 isolate->counters()->gc_last_resort_from_js()->Increment();
14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14698 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14699 "Runtime::PerformGC"); 14699 "Runtime::PerformGC");
14700 } 14700 }
14701 } 14701 }
14702 14702
14703 14703
14704 } } // namespace v8::internal 14704 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698