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

Side by Side Diff: src/builtins.cc

Issue 55007: Mark some of the places we leave V8 via callbacks as transitions to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 | « no previous file | src/handles.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 data, 369 data,
370 holder, 370 holder,
371 callee, 371 callee,
372 is_construct, 372 is_construct,
373 reinterpret_cast<void**>(__argv__ - 1), 373 reinterpret_cast<void**>(__argv__ - 1),
374 __argc__ - 1); 374 __argc__ - 1);
375 375
376 v8::Handle<v8::Value> value; 376 v8::Handle<v8::Value> value;
377 { 377 {
378 // Leaving JavaScript. 378 // Leaving JavaScript.
379 VMState state(OTHER); 379 VMState state(EXTERNAL);
380 value = callback(args); 380 value = callback(args);
381 } 381 }
382 if (value.IsEmpty()) { 382 if (value.IsEmpty()) {
383 result = Heap::undefined_value(); 383 result = Heap::undefined_value();
384 } else { 384 } else {
385 result = *reinterpret_cast<Object**>(*value); 385 result = *reinterpret_cast<Object**>(*value);
386 } 386 }
387 387
388 RETURN_IF_SCHEDULED_EXCEPTION(); 388 RETURN_IF_SCHEDULED_EXCEPTION();
389 if (!is_construct || result->IsJSObject()) return result; 389 if (!is_construct || result->IsJSObject()) return result;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 v8::Arguments args = v8::ImplementationUtilities::NewArguments( 430 v8::Arguments args = v8::ImplementationUtilities::NewArguments(
431 data, 431 data,
432 self, 432 self,
433 callee, 433 callee,
434 false, 434 false,
435 reinterpret_cast<void**>(__argv__ - 1), 435 reinterpret_cast<void**>(__argv__ - 1),
436 __argc__ - 1); 436 __argc__ - 1);
437 v8::Handle<v8::Value> value; 437 v8::Handle<v8::Value> value;
438 { 438 {
439 // Leaving JavaScript. 439 // Leaving JavaScript.
440 VMState state(OTHER); 440 VMState state(EXTERNAL);
441 value = callback(args); 441 value = callback(args);
442 } 442 }
443 if (value.IsEmpty()) { 443 if (value.IsEmpty()) {
444 result = Heap::undefined_value(); 444 result = Heap::undefined_value();
445 } else { 445 } else {
446 result = *reinterpret_cast<Object**>(*value); 446 result = *reinterpret_cast<Object**>(*value);
447 } 447 }
448 } 448 }
449 // Check for exceptions and return result. 449 // Check for exceptions and return result.
450 RETURN_IF_SCHEDULED_EXCEPTION(); 450 RETURN_IF_SCHEDULED_EXCEPTION();
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (entry->contains(pc)) { 735 if (entry->contains(pc)) {
736 return names_[i]; 736 return names_[i];
737 } 737 }
738 } 738 }
739 } 739 }
740 return NULL; 740 return NULL;
741 } 741 }
742 742
743 743
744 } } // namespace v8::internal 744 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698