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

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

Issue 2724673002: [WIP] Introduce ScriptResourceData
Patch Set: Fix Created 3 years, 7 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 24 matching lines...) Expand all
35 #include "core/CoreExport.h" 35 #include "core/CoreExport.h"
36 #include "platform/loader/fetch/AccessControlStatus.h" 36 #include "platform/loader/fetch/AccessControlStatus.h"
37 #include "platform/wtf/Allocator.h" 37 #include "platform/wtf/Allocator.h"
38 #include "platform/wtf/text/TextPosition.h" 38 #include "platform/wtf/text/TextPosition.h"
39 #include "platform/wtf/text/WTFString.h" 39 #include "platform/wtf/text/WTFString.h"
40 #include "v8/include/v8.h" 40 #include "v8/include/v8.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class CachedMetadataHandler; 44 class CachedMetadataHandler;
45 class ScriptResource; 45 class ScriptResourceData;
46 class ScriptSourceCode; 46 class ScriptSourceCode;
47 class ExecutionContext; 47 class ExecutionContext;
48 class ScriptStreamer; 48 class ScriptStreamer;
49 49
50 class CORE_EXPORT V8ScriptRunner final { 50 class CORE_EXPORT V8ScriptRunner final {
51 STATIC_ONLY(V8ScriptRunner); 51 STATIC_ONLY(V8ScriptRunner);
52 52
53 public: 53 public:
54 // For the following methods, the caller sites have to hold 54 // For the following methods, the caller sites have to hold
55 // a HandleScope and a ContextScope. 55 // a HandleScope and a ContextScope.
(...skipping 11 matching lines...) Expand all
67 V8CacheOptions); 67 V8CacheOptions);
68 // CachedMetadataHandler is set when metadata caching is supported. For 68 // CachedMetadataHandler is set when metadata caching is supported. For
69 // normal scripe resources, CachedMetadataHandler is from ScriptResource. 69 // normal scripe resources, CachedMetadataHandler is from ScriptResource.
70 // For worker script, ScriptResource is null but CachedMetadataHandler may be 70 // For worker script, ScriptResource is null but CachedMetadataHandler may be
71 // set. When ScriptStreamer is set, ScriptResource must be set. 71 // set. When ScriptStreamer is set, ScriptResource must be set.
72 static v8::MaybeLocal<v8::Script> CompileScript(v8::Local<v8::String>, 72 static v8::MaybeLocal<v8::Script> CompileScript(v8::Local<v8::String>,
73 const String& file_name, 73 const String& file_name,
74 const String& source_map_url, 74 const String& source_map_url,
75 const TextPosition&, 75 const TextPosition&,
76 v8::Isolate*, 76 v8::Isolate*,
77 ScriptResource*, 77 const ScriptResourceData*,
78 ScriptStreamer*, 78 ScriptStreamer*,
79 CachedMetadataHandler*, 79 CachedMetadataHandler*,
80 AccessControlStatus, 80 AccessControlStatus,
81 V8CacheOptions); 81 V8CacheOptions);
82 static v8::MaybeLocal<v8::Module> CompileModule(v8::Isolate*, 82 static v8::MaybeLocal<v8::Module> CompileModule(v8::Isolate*,
83 const String& source, 83 const String& source,
84 const String& file_name, 84 const String& file_name,
85 AccessControlStatus); 85 AccessControlStatus);
86 static v8::MaybeLocal<v8::Value> RunCompiledScript(v8::Isolate*, 86 static v8::MaybeLocal<v8::Value> RunCompiledScript(v8::Isolate*,
87 v8::Local<v8::Script>, 87 v8::Local<v8::Script>,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 private: 150 private:
151 static v8::MaybeLocal<v8::Value> CallExtraHelper(ScriptState*, 151 static v8::MaybeLocal<v8::Value> CallExtraHelper(ScriptState*,
152 const char* name, 152 const char* name,
153 size_t num_args, 153 size_t num_args,
154 v8::Local<v8::Value>* args); 154 v8::Local<v8::Value>* args);
155 }; 155 };
156 156
157 } // namespace blink 157 } // namespace blink
158 158
159 #endif // V8ScriptRunner_h 159 #endif // V8ScriptRunner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698