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

Side by Side Diff: src/v8natives.js

Issue 582093002: Revert "filter cross context eval" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-api.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file relies on the fact that the following declarations have been made 5 // This file relies on the fact that the following declarations have been made
6 // in runtime.js: 6 // in runtime.js:
7 // var $Object = global.Object; 7 // var $Object = global.Object;
8 // var $Boolean = global.Boolean; 8 // var $Boolean = global.Boolean;
9 // var $Number = global.Number; 9 // var $Number = global.Number;
10 // var $Function = global.Function; 10 // var $Function = global.Function;
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 var body = (n > 0) ? ToString(arguments[n - 1]) : ''; 1852 var body = (n > 0) ? ToString(arguments[n - 1]) : '';
1853 return '(' + function_token + '(' + p + ') {\n' + body + '\n})'; 1853 return '(' + function_token + '(' + p + ') {\n' + body + '\n})';
1854 } 1854 }
1855 1855
1856 1856
1857 function FunctionConstructor(arg1) { // length == 1 1857 function FunctionConstructor(arg1) { // length == 1
1858 var source = NewFunctionString(arguments, 'function'); 1858 var source = NewFunctionString(arguments, 'function');
1859 var global_proxy = %GlobalProxy(global); 1859 var global_proxy = %GlobalProxy(global);
1860 // Compile the string in the constructor and not a helper so that errors 1860 // Compile the string in the constructor and not a helper so that errors
1861 // appear to come from here. 1861 // appear to come from here.
1862 var f = %CompileString(source, true); 1862 var f = %_CallFunction(global_proxy, %CompileString(source, true));
1863 if (!IS_FUNCTION(f)) return f;
1864 f = %_CallFunction(global_proxy, f);
1865 %FunctionMarkNameShouldPrintAsAnonymous(f); 1863 %FunctionMarkNameShouldPrintAsAnonymous(f);
1866 return f; 1864 return f;
1867 } 1865 }
1868 1866
1869 1867
1870 // ---------------------------------------------------------------------------- 1868 // ----------------------------------------------------------------------------
1871 1869
1872 function SetUpFunction() { 1870 function SetUpFunction() {
1873 %CheckIsBootstrapping(); 1871 %CheckIsBootstrapping();
1874 1872
(...skipping 30 matching lines...) Expand all
1905 } 1903 }
1906 if (!IS_SPEC_FUNCTION(method)) { 1904 if (!IS_SPEC_FUNCTION(method)) {
1907 throw MakeTypeError('not_iterable', [obj]); 1905 throw MakeTypeError('not_iterable', [obj]);
1908 } 1906 }
1909 var iterator = %_CallFunction(obj, method); 1907 var iterator = %_CallFunction(obj, method);
1910 if (!IS_SPEC_OBJECT(iterator)) { 1908 if (!IS_SPEC_OBJECT(iterator)) {
1911 throw MakeTypeError('not_an_iterator', [iterator]); 1909 throw MakeTypeError('not_an_iterator', [iterator]);
1912 } 1910 }
1913 return iterator; 1911 return iterator;
1914 } 1912 }
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698