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

Side by Side Diff: src/isolate.cc

Issue 239243018: Heap::AllocateStringFromOneByte() and major part of its callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 318
319 Handle<String> Isolate::StackTraceString() { 319 Handle<String> Isolate::StackTraceString() {
320 if (stack_trace_nesting_level_ == 0) { 320 if (stack_trace_nesting_level_ == 0) {
321 stack_trace_nesting_level_++; 321 stack_trace_nesting_level_++;
322 HeapStringAllocator allocator; 322 HeapStringAllocator allocator;
323 StringStream::ClearMentionedObjectCache(this); 323 StringStream::ClearMentionedObjectCache(this);
324 StringStream accumulator(&allocator); 324 StringStream accumulator(&allocator);
325 incomplete_message_ = &accumulator; 325 incomplete_message_ = &accumulator;
326 PrintStack(&accumulator); 326 PrintStack(&accumulator);
327 // TODO(ishell): Can this fail??
327 Handle<String> stack_trace = accumulator.ToString(this); 328 Handle<String> stack_trace = accumulator.ToString(this);
328 incomplete_message_ = NULL; 329 incomplete_message_ = NULL;
329 stack_trace_nesting_level_ = 0; 330 stack_trace_nesting_level_ = 0;
330 return stack_trace; 331 return stack_trace;
331 } else if (stack_trace_nesting_level_ == 1) { 332 } else if (stack_trace_nesting_level_ == 1) {
332 stack_trace_nesting_level_++; 333 stack_trace_nesting_level_++;
333 OS::PrintError( 334 OS::PrintError(
334 "\n\nAttempt to print stack while printing stack (double fault)\n"); 335 "\n\nAttempt to print stack while printing stack (double fault)\n");
335 OS::PrintError( 336 OS::PrintError(
336 "If you are lucky you may find a partial stack dump on stdout.\n\n"); 337 "If you are lucky you may find a partial stack dump on stdout.\n\n");
(...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map); 2251 Handle<JSObject> obj = factory()->NewJSObjectFromMap(map);
2251 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8); 2252 JSObject::NormalizeProperties(obj, KEEP_INOBJECT_PROPERTIES, 8);
2252 JSObject::SetProperty(registry, name, obj, NONE, STRICT).Assert(); 2253 JSObject::SetProperty(registry, name, obj, NONE, STRICT).Assert();
2253 } 2254 }
2254 } 2255 }
2255 return Handle<JSObject>::cast(factory()->symbol_registry()); 2256 return Handle<JSObject>::cast(factory()->symbol_registry());
2256 } 2257 }
2257 2258
2258 2259
2259 } } // namespace v8::internal 2260 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698