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

Side by Side Diff: src/bootstrapper.cc

Issue 11190050: Heavy cleanup of the external pointer API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased 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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 return from + sizeof(NestingCounterType); 2405 return from + sizeof(NestingCounterType);
2405 } 2406 }
2406 2407
2407 2408
2408 // Called when the top-level V8 mutex is destroyed. 2409 // Called when the top-level V8 mutex is destroyed.
2409 void Bootstrapper::FreeThreadResources() { 2410 void Bootstrapper::FreeThreadResources() {
2410 ASSERT(!IsActive()); 2411 ASSERT(!IsActive());
2411 } 2412 }
2412 2413
2413 } } // namespace v8::internal 2414 } } // 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