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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp

Issue 2639893003: [ES6 modules] Introduce Modulator "module map settings object" (Closed)
Patch Set: Created 3 years, 11 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) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "bindings/core/v8/DOMWrapperWorld.h" 34 #include "bindings/core/v8/DOMWrapperWorld.h"
35 #include "bindings/core/v8/ScriptController.h" 35 #include "bindings/core/v8/ScriptController.h"
36 #include "bindings/core/v8/ToV8.h" 36 #include "bindings/core/v8/ToV8.h"
37 #include "bindings/core/v8/V8Binding.h" 37 #include "bindings/core/v8/V8Binding.h"
38 #include "bindings/core/v8/V8DOMActivityLogger.h" 38 #include "bindings/core/v8/V8DOMActivityLogger.h"
39 #include "bindings/core/v8/V8HTMLDocument.h" 39 #include "bindings/core/v8/V8HTMLDocument.h"
40 #include "bindings/core/v8/V8HiddenValue.h" 40 #include "bindings/core/v8/V8HiddenValue.h"
41 #include "bindings/core/v8/V8Initializer.h" 41 #include "bindings/core/v8/V8Initializer.h"
42 #include "bindings/core/v8/V8PrivateProperty.h" 42 #include "bindings/core/v8/V8PrivateProperty.h"
43 #include "bindings/core/v8/V8Window.h" 43 #include "bindings/core/v8/V8Window.h"
44 #include "core/dom/Modulator.h"
44 #include "core/frame/LocalFrame.h" 45 #include "core/frame/LocalFrame.h"
45 #include "core/frame/csp/ContentSecurityPolicy.h" 46 #include "core/frame/csp/ContentSecurityPolicy.h"
46 #include "core/html/DocumentNameCollection.h" 47 #include "core/html/DocumentNameCollection.h"
47 #include "core/html/HTMLIFrameElement.h" 48 #include "core/html/HTMLIFrameElement.h"
48 #include "core/inspector/MainThreadDebugger.h" 49 #include "core/inspector/MainThreadDebugger.h"
49 #include "core/loader/FrameLoader.h" 50 #include "core/loader/FrameLoader.h"
50 #include "core/loader/FrameLoaderClient.h" 51 #include "core/loader/FrameLoaderClient.h"
51 #include "core/origin_trials/OriginTrialContext.h" 52 #include "core/origin_trials/OriginTrialContext.h"
52 #include "platform/Histogram.h" 53 #include "platform/Histogram.h"
53 #include "platform/RuntimeEnabledFeatures.h" 54 #include "platform/RuntimeEnabledFeatures.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // to update. The update is done when the window proxy gets initialized later. 242 // to update. The update is done when the window proxy gets initialized later.
242 if (m_lifecycle == Lifecycle::ContextUninitialized) 243 if (m_lifecycle == Lifecycle::ContextUninitialized)
243 return; 244 return;
244 // TODO(yukishiino): Is it okay to not update document when the context 245 // TODO(yukishiino): Is it okay to not update document when the context
245 // is detached? It's not trivial to fix this because udpateDocumentProperty 246 // is detached? It's not trivial to fix this because udpateDocumentProperty
246 // requires a not-yet-detached context to instantiate a document wrapper. 247 // requires a not-yet-detached context to instantiate a document wrapper.
247 if (m_lifecycle == Lifecycle::ContextDetached) 248 if (m_lifecycle == Lifecycle::ContextDetached)
248 return; 249 return;
249 250
250 updateActivityLogger(); 251 updateActivityLogger();
252 m_scriptState->perContextData()->clearModulator();
haraken 2017/01/18 06:55:55 Why do you want to clear a modulator here?
kouhei (in TOK) 2017/01/18 07:07:10 Chatted offline. We shouldn't clear a modulator he
251 updateDocumentProperty(); 253 updateDocumentProperty();
252 updateSecurityOrigin(frame()->document()->getSecurityOrigin()); 254 updateSecurityOrigin(frame()->document()->getSecurityOrigin());
253 } 255 }
254 256
255 static v8::Local<v8::Value> getNamedProperty( 257 static v8::Local<v8::Value> getNamedProperty(
256 HTMLDocument* htmlDocument, 258 HTMLDocument* htmlDocument,
257 const AtomicString& key, 259 const AtomicString& key,
258 v8::Local<v8::Object> creationContext, 260 v8::Local<v8::Object> creationContext,
259 v8::Isolate* isolate) { 261 v8::Isolate* isolate) {
260 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key)) 262 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key))
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 355
354 setSecurityToken(origin); 356 setSecurityToken(origin);
355 } 357 }
356 358
357 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate, 359 LocalWindowProxy::LocalWindowProxy(v8::Isolate* isolate,
358 LocalFrame& frame, 360 LocalFrame& frame,
359 RefPtr<DOMWrapperWorld> world) 361 RefPtr<DOMWrapperWorld> world)
360 : WindowProxy(isolate, frame, std::move(world)) {} 362 : WindowProxy(isolate, frame, std::move(world)) {}
361 363
362 } // namespace blink 364 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698