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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h

Issue 2709703004: Clean up V8ObjectConstructor (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 v8::Isolate*); 109 v8::Isolate*);
110 static v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, 110 static v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>,
111 ExecutionContext*, 111 ExecutionContext*,
112 v8::Local<v8::Value> receiver, 112 v8::Local<v8::Value> receiver,
113 int argc, 113 int argc,
114 v8::Local<v8::Value> info[], 114 v8::Local<v8::Value> info[],
115 v8::Isolate*); 115 v8::Isolate*);
116 static v8::MaybeLocal<v8::Value> evaluateModule(v8::Local<v8::Module>, 116 static v8::MaybeLocal<v8::Value> evaluateModule(v8::Local<v8::Module>,
117 v8::Local<v8::Context>, 117 v8::Local<v8::Context>,
118 v8::Isolate*); 118 v8::Isolate*);
119 static v8::MaybeLocal<v8::Object> instantiateObject(
120 v8::Isolate*,
121 v8::Local<v8::ObjectTemplate>);
122 static v8::MaybeLocal<v8::Object> instantiateObject(
123 v8::Isolate*,
124 v8::Local<v8::Function>,
125 int argc = 0,
126 v8::Local<v8::Value> argv[] = 0);
127 static v8::MaybeLocal<v8::Object> instantiateObjectInDocument(
128 v8::Isolate*,
129 v8::Local<v8::Function>,
130 ExecutionContext*,
131 int argc = 0,
132 v8::Local<v8::Value> argv[] = 0);
133 119
134 static uint32_t tagForParserCache(CachedMetadataHandler*); 120 static uint32_t tagForParserCache(CachedMetadataHandler*);
135 static uint32_t tagForCodeCache(CachedMetadataHandler*); 121 static uint32_t tagForCodeCache(CachedMetadataHandler*);
136 static void setCacheTimeStamp(CachedMetadataHandler*); 122 static void setCacheTimeStamp(CachedMetadataHandler*);
137 123
138 // Utiltiies for calling functions added to the V8 extras binding object. 124 // Utilities for calling functions added to the V8 extras binding object.
139 125
140 template <size_t N> 126 template <size_t N>
141 static v8::MaybeLocal<v8::Value> callExtra(ScriptState* scriptState, 127 static v8::MaybeLocal<v8::Value> callExtra(ScriptState* scriptState,
142 const char* name, 128 const char* name,
143 v8::Local<v8::Value> (&args)[N]) { 129 v8::Local<v8::Value> (&args)[N]) {
144 return callExtraHelper(scriptState, name, N, args); 130 return callExtraHelper(scriptState, name, N, args);
145 } 131 }
146 132
147 template <size_t N> 133 template <size_t N>
148 static v8::Local<v8::Value> callExtraOrCrash( 134 static v8::Local<v8::Value> callExtraOrCrash(
(...skipping 21 matching lines...) Expand all
170 return v8::MaybeLocal<v8::Value>(); 156 return v8::MaybeLocal<v8::Value>();
171 v8::Local<v8::Function> function = functionValue.As<v8::Function>(); 157 v8::Local<v8::Function> function = functionValue.As<v8::Function>();
172 return V8ScriptRunner::callInternalFunction(function, undefined, numArgs, 158 return V8ScriptRunner::callInternalFunction(function, undefined, numArgs,
173 args, isolate); 159 args, isolate);
174 } 160 }
175 }; 161 };
176 162
177 } // namespace blink 163 } // namespace blink
178 164
179 #endif // V8ScriptRunner_h 165 #endif // V8ScriptRunner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698