#include "extensions/renderer/safe_builtins.h"
#include "base/check.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "extensions/renderer/script_context.h"
#include "extensions/renderer/v8_helpers.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-exception.h"
#include "v8/include/v8-extension.h"
#include "v8/include/v8-function.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-microtask-queue.h"
#include "v8/include/v8-object.h"
#include "v8/include/v8-primitive-object.h"
#include "v8/include/v8-primitive.h"
#include "v8/include/v8-template.h"
namespace extensions {
namespace {
const char kClassName[] = …;
const char kScript[] = …;
v8::Local<v8::Private> MakeKey(const char* name, v8::Isolate* isolate) { … }
void SaveImpl(const char* name,
v8::Local<v8::Value> value,
v8::Local<v8::Context> context) { … }
v8::Local<v8::Object> Load(const char* name, v8::Local<v8::Context> context) { … }
class ExtensionImpl : public v8::Extension { … };
}
std::unique_ptr<v8::Extension> SafeBuiltins::CreateV8Extension() { … }
SafeBuiltins::SafeBuiltins(ScriptContext* context) : … { … }
SafeBuiltins::~SafeBuiltins() = default;
v8::Local<v8::Object> SafeBuiltins::GetArray() const { … }
v8::Local<v8::Object> SafeBuiltins::GetFunction() const { … }
v8::Local<v8::Object> SafeBuiltins::GetJSON() const { … }
v8::Local<v8::Object> SafeBuiltins::GetObjekt() const { … }
v8::Local<v8::Object> SafeBuiltins::GetRegExp() const { … }
v8::Local<v8::Object> SafeBuiltins::GetString() const { … }
v8::Local<v8::Object> SafeBuiltins::GetError() const { … }
v8::Local<v8::Object> SafeBuiltins::GetPromise() const { … }
}