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

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

Issue 2709703004: Clean up V8ObjectConstructor (Closed)
Patch Set: 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( 119 static v8::MaybeLocal<v8::Object> instantiateObject(
jbroman 2017/02/21 22:10:28 You have deleted the definition of this function,
adithyas 2017/02/21 22:37:41 Oops, forgot to do that.
120 v8::Isolate*, 120 v8::Isolate*,
121 v8::Local<v8::ObjectTemplate>);
122 static v8::MaybeLocal<v8::Object> instantiateObject(
123 v8::Isolate*,
124 v8::Local<v8::Function>, 121 v8::Local<v8::Function>,
125 int argc = 0, 122 int argc = 0,
126 v8::Local<v8::Value> argv[] = 0); 123 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 124
134 static uint32_t tagForParserCache(CachedMetadataHandler*); 125 static uint32_t tagForParserCache(CachedMetadataHandler*);
135 static uint32_t tagForCodeCache(CachedMetadataHandler*); 126 static uint32_t tagForCodeCache(CachedMetadataHandler*);
136 static void setCacheTimeStamp(CachedMetadataHandler*); 127 static void setCacheTimeStamp(CachedMetadataHandler*);
137 128
138 // Utiltiies for calling functions added to the V8 extras binding object. 129 // Utilities for calling functions added to the V8 extras binding object.
139 130
140 template <size_t N> 131 template <size_t N>
141 static v8::MaybeLocal<v8::Value> callExtra(ScriptState* scriptState, 132 static v8::MaybeLocal<v8::Value> callExtra(ScriptState* scriptState,
142 const char* name, 133 const char* name,
143 v8::Local<v8::Value> (&args)[N]) { 134 v8::Local<v8::Value> (&args)[N]) {
144 return callExtraHelper(scriptState, name, N, args); 135 return callExtraHelper(scriptState, name, N, args);
145 } 136 }
146 137
147 template <size_t N> 138 template <size_t N>
148 static v8::Local<v8::Value> callExtraOrCrash( 139 static v8::Local<v8::Value> callExtraOrCrash(
(...skipping 21 matching lines...) Expand all
170 return v8::MaybeLocal<v8::Value>(); 161 return v8::MaybeLocal<v8::Value>();
171 v8::Local<v8::Function> function = functionValue.As<v8::Function>(); 162 v8::Local<v8::Function> function = functionValue.As<v8::Function>();
172 return V8ScriptRunner::callInternalFunction(function, undefined, numArgs, 163 return V8ScriptRunner::callInternalFunction(function, undefined, numArgs,
173 args, isolate); 164 args, isolate);
174 } 165 }
175 }; 166 };
176 167
177 } // namespace blink 168 } // namespace blink
178 169
179 #endif // V8ScriptRunner_h 170 #endif // V8ScriptRunner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698