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

Side by Side Diff: src/runtime.cc

Issue 17781002: Allow users of the V8 API to distinguish between unset and undefined HiddenValues (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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') | test/cctest/test-api.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 13362 matching lines...) Expand 10 before | Expand all | Expand 10 after
13373 13373
13374 13374
13375 // Retrieve the stack trace. This could be the raw stack trace collected 13375 // Retrieve the stack trace. This could be the raw stack trace collected
13376 // on stack overflow or the already formatted stack trace string. 13376 // on stack overflow or the already formatted stack trace string.
13377 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOverflowedStackTrace) { 13377 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOverflowedStackTrace) {
13378 HandleScope scope(isolate); 13378 HandleScope scope(isolate);
13379 ASSERT_EQ(args.length(), 1); 13379 ASSERT_EQ(args.length(), 1);
13380 CONVERT_ARG_CHECKED(JSObject, error_object, 0); 13380 CONVERT_ARG_CHECKED(JSObject, error_object, 0);
13381 String* key = isolate->heap()->hidden_stack_trace_string(); 13381 String* key = isolate->heap()->hidden_stack_trace_string();
13382 Object* result = error_object->GetHiddenProperty(key); 13382 Object* result = error_object->GetHiddenProperty(key);
13383 if (result->IsTheHole()) result = isolate->heap()->undefined_value();
13383 RUNTIME_ASSERT(result->IsJSArray() || 13384 RUNTIME_ASSERT(result->IsJSArray() ||
13384 result->IsString() || 13385 result->IsString() ||
13385 result->IsUndefined()); 13386 result->IsUndefined());
13386 return result; 13387 return result;
13387 } 13388 }
13388 13389
13389 13390
13390 // Set or clear the stack trace attached to an stack overflow error object. 13391 // Set or clear the stack trace attached to an stack overflow error object.
13391 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetOverflowedStackTrace) { 13392 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetOverflowedStackTrace) {
13392 HandleScope scope(isolate); 13393 HandleScope scope(isolate);
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
13922 // Handle last resort GC and make sure to allow future allocations 13923 // Handle last resort GC and make sure to allow future allocations
13923 // to grow the heap without causing GCs (if possible). 13924 // to grow the heap without causing GCs (if possible).
13924 isolate->counters()->gc_last_resort_from_js()->Increment(); 13925 isolate->counters()->gc_last_resort_from_js()->Increment();
13925 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13926 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13926 "Runtime::PerformGC"); 13927 "Runtime::PerformGC");
13927 } 13928 }
13928 } 13929 }
13929 13930
13930 13931
13931 } } // namespace v8::internal 13932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698