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

Side by Side Diff: src/objects.cc

Issue 12254007: Make the Isolate parameter mandatory for internal HandleScopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 10 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/messages.cc ('k') | src/objects-printer.cc » ('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 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 bool JSProxy::HasElementWithHandler(uint32_t index) { 296 bool JSProxy::HasElementWithHandler(uint32_t index) {
297 String* name; 297 String* name;
298 MaybeObject* maybe = GetHeap()->Uint32ToString(index); 298 MaybeObject* maybe = GetHeap()->Uint32ToString(index);
299 if (!maybe->To<String>(&name)) return maybe; 299 if (!maybe->To<String>(&name)) return maybe;
300 return HasPropertyWithHandler(name); 300 return HasPropertyWithHandler(name);
301 } 301 }
302 302
303 303
304 MaybeObject* Object::GetPropertyWithDefinedGetter(Object* receiver, 304 MaybeObject* Object::GetPropertyWithDefinedGetter(Object* receiver,
305 JSReceiver* getter) { 305 JSReceiver* getter) {
306 HandleScope scope; 306 Isolate* isolate = getter->GetIsolate();
307 HandleScope scope(isolate);
307 Handle<JSReceiver> fun(getter); 308 Handle<JSReceiver> fun(getter);
308 Handle<Object> self(receiver); 309 Handle<Object> self(receiver);
309 #ifdef ENABLE_DEBUGGER_SUPPORT 310 #ifdef ENABLE_DEBUGGER_SUPPORT
310 Debug* debug = fun->GetHeap()->isolate()->debug(); 311 Debug* debug = isolate->debug();
311 // Handle stepping into a getter if step into is active. 312 // Handle stepping into a getter if step into is active.
312 // TODO(rossberg): should this apply to getters that are function proxies? 313 // TODO(rossberg): should this apply to getters that are function proxies?
313 if (debug->StepInActive() && fun->IsJSFunction()) { 314 if (debug->StepInActive() && fun->IsJSFunction()) {
314 debug->HandleStepIn( 315 debug->HandleStepIn(
315 Handle<JSFunction>::cast(fun), Handle<Object>::null(), 0, false); 316 Handle<JSFunction>::cast(fun), Handle<Object>::null(), 0, false);
316 } 317 }
317 #endif 318 #endif
318 319
319 bool has_pending_exception; 320 bool has_pending_exception;
320 Handle<Object> result = 321 Handle<Object> result =
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1194
1194 void JSObject::PrintElementsTransition( 1195 void JSObject::PrintElementsTransition(
1195 FILE* file, ElementsKind from_kind, FixedArrayBase* from_elements, 1196 FILE* file, ElementsKind from_kind, FixedArrayBase* from_elements,
1196 ElementsKind to_kind, FixedArrayBase* to_elements) { 1197 ElementsKind to_kind, FixedArrayBase* to_elements) {
1197 if (from_kind != to_kind) { 1198 if (from_kind != to_kind) {
1198 PrintF(file, "elements transition ["); 1199 PrintF(file, "elements transition [");
1199 PrintElementsKind(file, from_kind); 1200 PrintElementsKind(file, from_kind);
1200 PrintF(file, " -> "); 1201 PrintF(file, " -> ");
1201 PrintElementsKind(file, to_kind); 1202 PrintElementsKind(file, to_kind);
1202 PrintF(file, "] in "); 1203 PrintF(file, "] in ");
1203 JavaScriptFrame::PrintTop(file, false, true); 1204 JavaScriptFrame::PrintTop(GetIsolate(), file, false, true);
1204 PrintF(file, " for "); 1205 PrintF(file, " for ");
1205 ShortPrint(file); 1206 ShortPrint(file);
1206 PrintF(file, " from "); 1207 PrintF(file, " from ");
1207 from_elements->ShortPrint(file); 1208 from_elements->ShortPrint(file);
1208 PrintF(file, " to "); 1209 PrintF(file, " to ");
1209 to_elements->ShortPrint(file); 1210 to_elements->ShortPrint(file);
1210 PrintF(file, "\n"); 1211 PrintF(file, "\n");
1211 } 1212 }
1212 } 1213 }
1213 1214
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 1747
1747 return *hresult; 1748 return *hresult;
1748 } 1749 }
1749 1750
1750 1751
1751 void JSObject::EnqueueChangeRecord(Handle<JSObject> object, 1752 void JSObject::EnqueueChangeRecord(Handle<JSObject> object,
1752 const char* type_str, 1753 const char* type_str,
1753 Handle<String> name, 1754 Handle<String> name,
1754 Handle<Object> old_value) { 1755 Handle<Object> old_value) {
1755 Isolate* isolate = object->GetIsolate(); 1756 Isolate* isolate = object->GetIsolate();
1756 HandleScope scope; 1757 HandleScope scope(isolate);
1757 Handle<String> type = isolate->factory()->LookupUtf8Symbol(type_str); 1758 Handle<String> type = isolate->factory()->LookupUtf8Symbol(type_str);
1758 if (object->IsJSGlobalObject()) { 1759 if (object->IsJSGlobalObject()) {
1759 object = handle(JSGlobalObject::cast(*object)->global_receiver(), isolate); 1760 object = handle(JSGlobalObject::cast(*object)->global_receiver(), isolate);
1760 } 1761 }
1761 Handle<Object> args[] = { type, object, name, old_value }; 1762 Handle<Object> args[] = { type, object, name, old_value };
1762 bool threw; 1763 bool threw;
1763 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()), 1764 Execution::Call(Handle<JSFunction>(isolate->observers_notify_change()),
1764 Handle<Object>(isolate->heap()->undefined_value()), 1765 Handle<Object>(isolate->heap()->undefined_value()),
1765 old_value->IsTheHole() ? 3 : 4, args, 1766 old_value->IsTheHole() ? 3 : 4, args,
1766 &threw); 1767 &threw);
(...skipping 12155 matching lines...) Expand 10 before | Expand all | Expand 10 after
13922 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13923 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13923 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13924 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13924 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13925 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13925 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13926 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13926 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13927 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13927 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13928 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13928 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13929 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13929 } 13930 }
13930 13931
13931 } } // namespace v8::internal 13932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698