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

Side by Side Diff: src/bootstrapper.cc

Issue 176843003: Add StackOverflowError and expose error type to api. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix test Created 6 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 | « src/api.cc ('k') | src/factory.h » ('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 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("global")); 1697 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("global"));
1698 Handle<Object> global_obj(native_context()->global_object(), isolate()); 1698 Handle<Object> global_obj(native_context()->global_object(), isolate());
1699 CHECK_NOT_EMPTY_HANDLE(isolate(), 1699 CHECK_NOT_EMPTY_HANDLE(isolate(),
1700 JSObject::SetLocalPropertyIgnoreAttributes( 1700 JSObject::SetLocalPropertyIgnoreAttributes(
1701 builtins, global_string, global_obj, attributes)); 1701 builtins, global_string, global_obj, attributes));
1702 Handle<String> builtins_string = 1702 Handle<String> builtins_string =
1703 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("builtins")); 1703 factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("builtins"));
1704 CHECK_NOT_EMPTY_HANDLE(isolate(), 1704 CHECK_NOT_EMPTY_HANDLE(isolate(),
1705 JSObject::SetLocalPropertyIgnoreAttributes( 1705 JSObject::SetLocalPropertyIgnoreAttributes(
1706 builtins, builtins_string, builtins, attributes)); 1706 builtins, builtins_string, builtins, attributes));
1707 Handle<String> error_type_symbol =
1708 factory()->InternalizeOneByteString(
1709 STATIC_ASCII_VECTOR("error_type_symbol"));
1710 CHECK_NOT_EMPTY_HANDLE(
1711 isolate(),
1712 JSObject::SetLocalPropertyIgnoreAttributes(
1713 builtins, error_type_symbol, handle(isolate()->heap()->error_type()),
1714 attributes));
1707 1715
1708 // Set up the reference from the global object to the builtins object. 1716 // Set up the reference from the global object to the builtins object.
1709 JSGlobalObject::cast(native_context()->global_object())-> 1717 JSGlobalObject::cast(native_context()->global_object())->
1710 set_builtins(*builtins); 1718 set_builtins(*builtins);
1711 1719
1712 // Create a bridge function that has context in the native context. 1720 // Create a bridge function that has context in the native context.
1713 Handle<JSFunction> bridge = 1721 Handle<JSFunction> bridge =
1714 factory()->NewFunction(factory()->empty_string(), 1722 factory()->NewFunction(factory()->empty_string(),
1715 factory()->undefined_value()); 1723 factory()->undefined_value());
1716 ASSERT(bridge->context() == *isolate()->native_context()); 1724 ASSERT(bridge->context() == *isolate()->native_context());
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 return from + sizeof(NestingCounterType); 2754 return from + sizeof(NestingCounterType);
2747 } 2755 }
2748 2756
2749 2757
2750 // Called when the top-level V8 mutex is destroyed. 2758 // Called when the top-level V8 mutex is destroyed.
2751 void Bootstrapper::FreeThreadResources() { 2759 void Bootstrapper::FreeThreadResources() {
2752 ASSERT(!IsActive()); 2760 ASSERT(!IsActive());
2753 } 2761 }
2754 2762
2755 } } // namespace v8::internal 2763 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698