From: ws29.jung Date: Wed, 11 Jul 2018 02:01:14 +0000 (+0900) Subject: Check Injected Bundle inject status X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F183773%2F1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Check Injected Bundle inject status Before this patch, Injected Bundle was injected everytime when BrowserContext is constructed. BrowserContext can be constructed multiple time with webapp but Bundle Injection should be done only at the first time. With this patch, Injection will be done only once. Change-Id: Ia7fc7e0e896cca749182ead287829f99118b03b2 Signed-off-by: ws29.jung --- diff --git a/vendor/brightray/browser/browser_context.cc b/vendor/brightray/browser/browser_context.cc index 2f709bb..95530bf 100644 --- a/vendor/brightray/browser/browser_context.cc +++ b/vendor/brightray/browser/browser_context.cc @@ -84,6 +84,7 @@ class BrowserContext::ResourceContext : public content::ResourceContext { }; // static +bool did_bundle_injected = false; BrowserContext::BrowserContextMap BrowserContext::browser_context_map_; // static @@ -144,8 +145,11 @@ BrowserContext::BrowserContext(const std::string& partition, bool in_memory) #endif //content::ZygoteHandle *handle = content::GetGenericZygote(); //*handle->LoadInjectedBundlePath(injected_bundle_path); - (*content::GetGenericZygote())-> - LoadInjectedBundlePath(injected_bundle_path); + if (!did_bundle_injected) { + (*content::GetGenericZygote())-> + LoadInjectedBundlePath(injected_bundle_path); + did_bundle_injected = true; + } #if defined(OS_TIZEN) } #endif