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

Side by Side Diff: src/bootstrapper.cc

Issue 11365224: Re-land rev. 12849 and 12868 (Heavy cleanup of the external pointer API + related fix). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/compiler.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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 Handle<JSFunction> delegate = 1233 Handle<JSFunction> delegate =
1234 factory->NewFunction(factory->empty_symbol(), JS_OBJECT_TYPE, 1234 factory->NewFunction(factory->empty_symbol(), JS_OBJECT_TYPE,
1235 JSObject::kHeaderSize, code, true); 1235 JSObject::kHeaderSize, code, true);
1236 native_context()->set_call_as_constructor_delegate(*delegate); 1236 native_context()->set_call_as_constructor_delegate(*delegate);
1237 delegate->shared()->DontAdaptArguments(); 1237 delegate->shared()->DontAdaptArguments();
1238 } 1238 }
1239 1239
1240 // Initialize the out of memory slot. 1240 // Initialize the out of memory slot.
1241 native_context()->set_out_of_memory(heap->false_value()); 1241 native_context()->set_out_of_memory(heap->false_value());
1242 1242
1243 // Initialize the data slot. 1243 // Initialize the embedder data slot.
1244 native_context()->set_data(heap->undefined_value()); 1244 Handle<FixedArray> embedder_data = factory->NewFixedArray(2);
1245 native_context()->set_embedder_data(*embedder_data);
1245 1246
1246 { 1247 {
1247 // Initialize the random seed slot. 1248 // Initialize the random seed slot.
1248 Handle<ByteArray> zeroed_byte_array( 1249 Handle<ByteArray> zeroed_byte_array(
1249 factory->NewByteArray(kRandomStateSize)); 1250 factory->NewByteArray(kRandomStateSize));
1250 native_context()->set_random_seed(*zeroed_byte_array); 1251 native_context()->set_random_seed(*zeroed_byte_array);
1251 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); 1252 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize);
1252 } 1253 }
1253 return true; 1254 return true;
1254 } 1255 }
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2409 return from + sizeof(NestingCounterType); 2410 return from + sizeof(NestingCounterType);
2410 } 2411 }
2411 2412
2412 2413
2413 // Called when the top-level V8 mutex is destroyed. 2414 // Called when the top-level V8 mutex is destroyed.
2414 void Bootstrapper::FreeThreadResources() { 2415 void Bootstrapper::FreeThreadResources() {
2415 ASSERT(!IsActive()); 2416 ASSERT(!IsActive());
2416 } 2417 }
2417 2418
2418 } } // namespace v8::internal 2419 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698