// Copyright 2014 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. #include "src/builtins/accessors.h" #include "src/execution/isolate-inl.h" #include "src/heap/heap-inl.h" // For ToBoolean. TODO(jkummerow): Drop. namespace v8 { namespace internal { // TODO(5530): Remove once uses in debug.js are gone. RUNTIME_FUNCTION(Runtime_FunctionGetScriptSource) { HandleScope scope(isolate); DCHECK_EQ(1, args.length()); Handle function = args.at(0); if (function->IsJSFunction()) { Handle script(Handle::cast(function)->shared().script(), isolate); if (script->IsScript()) return Handle