DescriptionDo not use js builtins object to determine whether a function is a builtin.
We can use the script type to determine that instead. Script of type
TYPE_NATIVE are considered builtins, TYPE_NORMAL are not. The only exception
to this rule is the empty function, for which the script is TYPE_NATIVE
(observable by the debugger), but should be stringified to "function () {}"
instead of "function () { [native code] }". For this, I introduce a
hide_source flag on the script object.
We also use IsBuiltin and IsSubjectToDebugging interchangeably. For debugger,
we now use the latter, hiding the detail that only non-builtins are debuggable.
R=mstarzinger@chromium.org
Committed: https://crrev.com/371ad73a50f2c55286f59b34ca63920b44ca835f
Cr-Commit-Position: refs/heads/master@{#30285}
Patch Set 1 #Patch Set 2 : fix tostring #Patch Set 3 : remove redundant check #
Depends on Patchset: Messages
Total messages: 17 (7 generated)
|