Browse Source

make also top level built-in functions (like 'RegExp') strict; function name FIXMEs

pull/1/head
Sami Vaarala 12 years ago
parent
commit
f28cf69020
  1. 7
      src/duk_hthread_builtins.c

7
src/duk_hthread_builtins.c

@ -106,6 +106,11 @@ void duk_hthread_create_builtin_objects(duk_hthread *thr) {
h = duk_require_hobject(ctx, -1);
DUK_ASSERT(h != NULL);
/* Currently all built-in native functions are strict. */
DUK_HOBJECT_SET_STRICT(h);
/* FIXME: function name */
/* Almost all global level Function objects are constructable
* but not all: Function.prototype is a non-constructable,
* callable Function.
@ -355,6 +360,8 @@ void duk_hthread_create_builtin_objects(duk_hthread *thr) {
h_func = duk_require_hnativefunction(ctx, -1);
h_func = h_func; /* suppress warning (not referenced now) */
/* FIXME: function name */
/* Currently all built-in native functions are strict.
* This doesn't matter for many functions, but e.g.
* String.prototype.charAt (and other string functions)

Loading…
Cancel
Save