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

Side by Side Diff: src/bootstrapper.cc

Issue 200056: Made function prototype property DontEnum for compatibility with (Closed)
Patch Set: Created 11 years, 3 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
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // Allocate the message listeners object. 467 // Allocate the message listeners object.
468 v8::NeanderArray listeners; 468 v8::NeanderArray listeners;
469 global_context()->set_message_listeners(*listeners.value()); 469 global_context()->set_message_listeners(*listeners.value());
470 470
471 // Allocate the map for function instances. 471 // Allocate the map for function instances.
472 Handle<Map> fm = Factory::NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); 472 Handle<Map> fm = Factory::NewMap(JS_FUNCTION_TYPE, JSFunction::kSize);
473 global_context()->set_function_instance_map(*fm); 473 global_context()->set_function_instance_map(*fm);
474 // Please note that the prototype property for function instances must be 474 // Please note that the prototype property for function instances must be
475 // writable. 475 // writable.
476 Handle<DescriptorArray> function_map_descriptors = 476 Handle<DescriptorArray> function_map_descriptors =
477 ComputeFunctionInstanceDescriptor(false, true); 477 ComputeFunctionInstanceDescriptor(false, false);
478 fm->set_instance_descriptors(*function_map_descriptors); 478 fm->set_instance_descriptors(*function_map_descriptors);
479 479
480 // Allocate the function map first and then patch the prototype later 480 // Allocate the function map first and then patch the prototype later
481 fm = Factory::NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); 481 fm = Factory::NewMap(JS_FUNCTION_TYPE, JSFunction::kSize);
482 global_context()->set_function_map(*fm); 482 global_context()->set_function_map(*fm);
483 function_map_descriptors = ComputeFunctionInstanceDescriptor(true); 483 function_map_descriptors = ComputeFunctionInstanceDescriptor(true);
484 fm->set_instance_descriptors(*function_map_descriptors); 484 fm->set_instance_descriptors(*function_map_descriptors);
485 485
486 Handle<String> object_name = Handle<String>(Heap::Object_symbol()); 486 Handle<String> object_name = Handle<String>(Heap::Object_symbol());
487 487
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 } 1598 }
1599 1599
1600 1600
1601 // Restore statics that are thread local. 1601 // Restore statics that are thread local.
1602 char* Genesis::RestoreState(char* from) { 1602 char* Genesis::RestoreState(char* from) {
1603 current_ = *reinterpret_cast<Genesis**>(from); 1603 current_ = *reinterpret_cast<Genesis**>(from);
1604 return from + sizeof(current_); 1604 return from + sizeof(current_);
1605 } 1605 }
1606 1606
1607 } } // namespace v8::internal 1607 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698