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

Side by Side Diff: src/bootstrapper.cc

Issue 109013: Add the ability to set embedder data on created contexts from the API (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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/contexts.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 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 Handle<JSFunction> delegate = 826 Handle<JSFunction> delegate =
827 Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE, 827 Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE,
828 JSObject::kHeaderSize, code, true); 828 JSObject::kHeaderSize, code, true);
829 global_context()->set_call_as_function_delegate(*delegate); 829 global_context()->set_call_as_function_delegate(*delegate);
830 delegate->shared()->DontAdaptArguments(); 830 delegate->shared()->DontAdaptArguments();
831 831
832 global_context()->set_special_function_table(Heap::empty_fixed_array()); 832 global_context()->set_special_function_table(Heap::empty_fixed_array());
833 833
834 // Initialize the out of memory slot. 834 // Initialize the out of memory slot.
835 global_context()->set_out_of_memory(Heap::false_value()); 835 global_context()->set_out_of_memory(Heap::false_value());
836
837 // Initialize the data slot.
838 global_context()->set_data(Heap::undefined_value());
836 } 839 }
837 840
838 841
839 bool Genesis::CompileBuiltin(int index) { 842 bool Genesis::CompileBuiltin(int index) {
840 Vector<const char> name = Natives::GetScriptName(index); 843 Vector<const char> name = Natives::GetScriptName(index);
841 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index); 844 Handle<String> source_code = Bootstrapper::NativesSourceLookup(index);
842 return CompileNative(name, source_code); 845 return CompileNative(name, source_code);
843 } 846 }
844 847
845 848
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 } 1550 }
1548 1551
1549 1552
1550 // Restore statics that are thread local. 1553 // Restore statics that are thread local.
1551 char* Genesis::RestoreState(char* from) { 1554 char* Genesis::RestoreState(char* from) {
1552 current_ = *reinterpret_cast<Genesis**>(from); 1555 current_ = *reinterpret_cast<Genesis**>(from);
1553 return from + sizeof(current_); 1556 return from + sizeof(current_);
1554 } 1557 }
1555 1558
1556 } } // namespace v8::internal 1559 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698