bd219a7601
The alternative of passing an object template at context creation is unfeasible because we need a context to instantiate the template. At the time we create the context from snapshot or bootstrap from scratch, we would already need that template instance, leading to a chicken-and-egg problem. This is an alternative that is simpler and less intrusive. R=domenic@chromium.org, jochen@chromium.org Review URL: https://codereview.chromium.org/1182443002 Cr-Commit-Position: refs/heads/master@{#28938}
15 lines
379 B
JavaScript
15 lines
379 B
JavaScript
// Copyright 2015 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
(function (global, exports) {
|
|
'use strict';
|
|
exports.testExtraShouldReturnFive = function () {
|
|
return 5;
|
|
};
|
|
|
|
exports.testExtraShouldCallToRuntime = function() {
|
|
return exports.runtime(3);
|
|
};
|
|
})
|