OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 | 1579 |
1580 | 1580 |
1581 | 1581 |
1582 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc, | 1582 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc, |
1583 Handle<JSObject> instance, | 1583 Handle<JSObject> instance, |
1584 bool* pending_exception) { | 1584 bool* pending_exception) { |
1585 // Configure the instance by adding the properties specified by the | 1585 // Configure the instance by adding the properties specified by the |
1586 // instance template. | 1586 // instance template. |
1587 Handle<Object> instance_template(desc->instance_template(), isolate()); | 1587 Handle<Object> instance_template(desc->instance_template(), isolate()); |
1588 if (!instance_template->IsUndefined()) { | 1588 if (!instance_template->IsUndefined()) { |
1589 Execution::ConfigureInstance(instance, | 1589 Execution::ConfigureInstance(isolate(), |
| 1590 instance, |
1590 instance_template, | 1591 instance_template, |
1591 pending_exception); | 1592 pending_exception); |
1592 } else { | 1593 } else { |
1593 *pending_exception = false; | 1594 *pending_exception = false; |
1594 } | 1595 } |
1595 } | 1596 } |
1596 | 1597 |
1597 | 1598 |
1598 Handle<Object> Factory::GlobalConstantFor(Handle<String> name) { | 1599 Handle<Object> Factory::GlobalConstantFor(Handle<String> name) { |
1599 Heap* h = isolate()->heap(); | 1600 Heap* h = isolate()->heap(); |
1600 if (name->Equals(h->undefined_string())) return undefined_value(); | 1601 if (name->Equals(h->undefined_string())) return undefined_value(); |
1601 if (name->Equals(h->nan_string())) return nan_value(); | 1602 if (name->Equals(h->nan_string())) return nan_value(); |
1602 if (name->Equals(h->infinity_string())) return infinity_value(); | 1603 if (name->Equals(h->infinity_string())) return infinity_value(); |
1603 return Handle<Object>::null(); | 1604 return Handle<Object>::null(); |
1604 } | 1605 } |
1605 | 1606 |
1606 | 1607 |
1607 Handle<Object> Factory::ToBoolean(bool value) { | 1608 Handle<Object> Factory::ToBoolean(bool value) { |
1608 return value ? true_value() : false_value(); | 1609 return value ? true_value() : false_value(); |
1609 } | 1610 } |
1610 | 1611 |
1611 | 1612 |
1612 } } // namespace v8::internal | 1613 } } // namespace v8::internal |
OLD | NEW |