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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp

Issue 2386173002: reflow comments in Source/bindings/core/v8 (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
index 9afcfe26b0d308105ee005d45e8ef789d3484da8..77b88f46afa5d47ffc73ea9549231bf1216244de 100644
--- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp
@@ -110,9 +110,11 @@ static v8::Local<v8::Value> compileAndRunPrivateScript(ScriptState* scriptState,
return result;
}
-// Private scripts can use privateScriptController.import(bundledResource, compileAndRunScript) to import dependent resources.
+// Private scripts can use privateScriptController.import(bundledResource,
+// compileAndRunScript) to import dependent resources.
// |bundledResource| is a string resource name.
-// |compileAndRunScript| optional boolean representing if the javascript should be executed. Default: true.
+// |compileAndRunScript| optional boolean representing if the javascript should
+// be executed. Default: true.
void importFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
RELEASE_ASSERT(isolate && (args.Length() >= 1));
@@ -134,15 +136,16 @@ void importFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(v8String(isolate, resourceData));
}
-// FIXME: If we have X.js, XPartial-1.js and XPartial-2.js, currently all of the JS files
-// are compiled when any of the JS files is requested. Ideally we should avoid compiling
-// unrelated JS files. For example, if a method in XPartial-1.js is requested, we just
-// need to compile X.js and XPartial-1.js, and don't need to compile XPartial-2.js.
+// FIXME: If we have X.js, XPartial-1.js and XPartial-2.js, currently all of the
+// JS files are compiled when any of the JS files is requested. Ideally we
+// should avoid compiling unrelated JS files. For example, if a method in
+// XPartial-1.js is requested, we just need to compile X.js and XPartial-1.js,
+// and don't need to compile XPartial-2.js.
static void installPrivateScript(v8::Isolate* isolate, String className) {
ScriptState* scriptState = ScriptState::current(isolate);
int compiledScriptCount = 0;
-// |kPrivateScriptSourcesForTesting| is defined in V8PrivateScriptSources.h, which is auto-generated
-// by make_private_script_source.py.
+// |kPrivateScriptSourcesForTesting| is defined in V8PrivateScriptSources.h,
+// which is auto-generated by make_private_script_source.py.
#ifndef NDEBUG
for (size_t index = 0;
index < WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting); index++) {
@@ -156,8 +159,8 @@ static void installPrivateScript(v8::Isolate* isolate, String className) {
}
#endif
- // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is auto-generated
- // by make_private_script_source.py.
+ // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is
+ // auto-generated by make_private_script_source.py.
for (size_t index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources);
index++) {
if (className == kPrivateScriptSources[index].className) {
@@ -182,8 +185,8 @@ static void installPrivateScript(v8::Isolate* isolate, String className) {
static v8::Local<v8::Value> installPrivateScriptRunner(v8::Isolate* isolate) {
const String className = "PrivateScriptRunner";
size_t index;
- // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is auto-generated
- // by make_private_script_source.py.
+ // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is
+ // auto-generated by make_private_script_source.py.
for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); index++) {
if (className == kPrivateScriptSources[index].className)
break;
@@ -265,10 +268,11 @@ static void initializeHolderIfNeeded(ScriptState* scriptState,
}
}
- // Inject the prototype object of the private script into the prototype chain of the holder object.
- // This is necessary to let the holder object use properties defined on the prototype object
- // of the private script. (e.g., if the prototype object has |foo|, the holder object should be able
- // to use it with |this.foo|.)
+ // Inject the prototype object of the private script into the prototype chain
+ // of the holder object. This is necessary to let the holder object use
+ // properties defined on the prototype object of the private script. (e.g., if
+ // the prototype object has |foo|, the holder object should be able to use it
+ // with |this.foo|.)
if (classObject->GetPrototype() != holderObject->GetPrototype()) {
if (!v8CallBoolean(
classObject->SetPrototype(context, holderObject->GetPrototype()))) {

Powered by Google App Engine
This is Rietveld 408576698