diff -Nru chromium-browser-43.0.2357.81/android_webview/browser/aw_permission_manager.cc chromium-browser-43.0.2357.130/android_webview/browser/aw_permission_manager.cc --- chromium-browser-43.0.2357.81/android_webview/browser/aw_permission_manager.cc 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/browser/aw_permission_manager.cc 2015-06-22 22:56:43.000000000 +0000 @@ -4,28 +4,163 @@ #include "android_webview/browser/aw_permission_manager.h" +#include + #include "android_webview/browser/aw_browser_permission_request_delegate.h" #include "base/callback.h" +#include "base/containers/hash_tables.h" +#include "base/logging.h" +#include "base/memory/weak_ptr.h" #include "content/public/browser/permission_type.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +using content::PermissionStatus; +using content::PermissionType; + namespace android_webview { +class LastRequestResultCache { + public: + LastRequestResultCache() : weak_factory_(this) {} + + void SetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + PermissionStatus status) { + DCHECK(status == content::PERMISSION_STATUS_GRANTED || + status == content::PERMISSION_STATUS_DENIED); + + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + DLOG(WARNING) << "Not caching result because of empty origin."; + return; + } + + if (!requesting_origin.is_valid()) { + NOTREACHED() << requesting_origin.possibly_invalid_spec(); + return; + } + if (!embedding_origin.is_valid()) { + NOTREACHED() << embedding_origin.possibly_invalid_spec(); + return; + } + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + if (key.empty()) { + NOTREACHED(); + // Never store an empty key because it could inadvertently be used for + // another combination. + return; + } + pmi_result_cache_[key] = status; + } + + PermissionStatus GetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) const { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + NOTREACHED() << "Results are only cached for PROTECTED_MEDIA_IDENTIFIER"; + return content::PERMISSION_STATUS_ASK; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + StatusMap::const_iterator it = pmi_result_cache_.find(key); + if (it == pmi_result_cache_.end()) { + DLOG(WARNING) << "GetResult() called for uncached origins: " << key; + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(!key.empty()); + return it->second; + } + + void ClearResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached, so nothing to clear. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + pmi_result_cache_.erase(key); + } + + base::WeakPtr GetWeakPtr() { + return weak_factory_.GetWeakPtr(); + } + + private: + // Returns a concatenation of the origins to be used as the index. + // Returns the empty string if either origin is invalid or empty. + static std::string GetCacheKey(const GURL& requesting_origin, + const GURL& embedding_origin) { + const std::string& requesting = requesting_origin.spec(); + const std::string& embedding = embedding_origin.spec(); + if (requesting.empty() || embedding.empty()) + return std::string(); + return requesting + "," + embedding; + } + + using StatusMap = base::hash_map; + StatusMap pmi_result_cache_; + + base::WeakPtrFactory weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(LastRequestResultCache); +}; + namespace { void CallbackPermisisonStatusWrapper( + const base::WeakPtr& result_cache, const base::Callback& callback, + PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, bool allowed) { - callback.Run(allowed ? content::PERMISSION_STATUS_GRANTED - : content::PERMISSION_STATUS_DENIED); + PermissionStatus status = allowed ? content::PERMISSION_STATUS_GRANTED + : content::PERMISSION_STATUS_DENIED; + if (result_cache.get()) { + result_cache->SetResult(permission, requesting_origin, embedding_origin, + status); + } + + callback.Run(status); } } // anonymous namespace AwPermissionManager::AwPermissionManager() - : content::PermissionManager() { + : content::PermissionManager(), result_cache_(new LastRequestResultCache) { } AwPermissionManager::~AwPermissionManager() { @@ -50,14 +185,21 @@ return; } + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + switch (permission) { case content::PermissionType::GEOLOCATION: delegate->RequestGeolocationPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: delegate->RequestProtectedMediaIdentifierPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::MIDI_SYSEX: case content::PermissionType::NOTIFICATIONS: @@ -78,6 +220,13 @@ content::WebContents* web_contents, int request_id, const GURL& origin) { + // The caller is canceling (presumably) the most recent request. Assuming the + // request did not complete, the user did not respond to the requset. + // Thus, assume we do not know the result. + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + result_cache_->ClearResult(permission, origin, embedding_origin); + int render_process_id = web_contents->GetRenderProcessHost()->GetID(); int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID(); AwBrowserPermissionRequestDelegate* delegate = @@ -109,12 +258,19 @@ content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + result_cache_->ClearResult(permission, requesting_origin, embedding_origin); } content::PermissionStatus AwPermissionManager::GetPermissionStatus( content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + // Method is called outside the Permissions API only for this permission. + if (permission == PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + return result_cache_->GetResult(permission, requesting_origin, + embedding_origin); + } + return content::PERMISSION_STATUS_DENIED; } diff -Nru chromium-browser-43.0.2357.81/android_webview/browser/aw_permission_manager.h chromium-browser-43.0.2357.130/android_webview/browser/aw_permission_manager.h --- chromium-browser-43.0.2357.81/android_webview/browser/aw_permission_manager.h 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/browser/aw_permission_manager.h 2015-06-22 22:56:43.000000000 +0000 @@ -7,10 +7,13 @@ #include "base/callback_forward.h" #include "base/macros.h" +#include "base/memory/scoped_ptr.h" #include "content/public/browser/permission_manager.h" namespace android_webview { +class LastRequestResultCache; + class AwPermissionManager : public content::PermissionManager { public: AwPermissionManager(); @@ -46,6 +49,8 @@ void UnsubscribePermissionStatusChange(int subscription_id) override; private: + scoped_ptr result_cache_; + DISALLOW_COPY_AND_ASSIGN(AwPermissionManager); }; diff -Nru chromium-browser-43.0.2357.81/android_webview/browser/scoped_app_gl_state_restore.cc chromium-browser-43.0.2357.130/android_webview/browser/scoped_app_gl_state_restore.cc --- chromium-browser-43.0.2357.81/android_webview/browser/scoped_app_gl_state_restore.cc 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/browser/scoped_app_gl_state_restore.cc 2015-06-16 19:01:16.000000000 +0000 @@ -297,8 +297,11 @@ i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); } - // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. - glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT) { + // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. + glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + } + DCHECK(ClearGLErrors(false, NULL)); } diff -Nru chromium-browser-43.0.2357.81/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java chromium-browser-43.0.2357.130/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java --- chromium-browser-43.0.2357.81/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java 2015-06-16 19:01:16.000000000 +0000 @@ -6,20 +6,18 @@ /** * Helper class used to fix up resource ids. - * This is mostly a copy of the code in frameworks/base/core/java/android/app/LoadedApk.java. - * TODO: Remove if a cleaner mechanism is provided (either public API or AAPT is changed to generate - * this code). */ class ResourceRewriter { /** * Rewrite the R 'constants' for the WebView library apk. */ public static void rewriteRValues(final int packageId) { - // TODO: We should use jarjar to remove the redundant R classes here, but due - // to a bug in jarjar it's not possible to rename classes with '$' in their name. - // See b/15684775. + // This list must be kept up to date to include all R classes depended on directly or + // indirectly by android_webview_java. + // TODO(torne): find a better way to do this, http://crbug.com/492166. com.android.webview.chromium.R.onResourcesLoaded(packageId); org.chromium.android_webview.R.onResourcesLoaded(packageId); + org.chromium.components.web_contents_delegate_android.R.onResourcesLoaded(packageId); org.chromium.content.R.onResourcesLoaded(packageId); org.chromium.ui.R.onResourcesLoaded(packageId); } diff -Nru chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwContents.java chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwContents.java --- chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwContents.java 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwContents.java 2015-06-22 22:56:44.000000000 +0000 @@ -273,6 +273,10 @@ // through the resourcethrottle. This is only used for popup windows. private boolean mDeferredShouldOverrideUrlLoadingIsPendingForPopup; + // This is a workaround for some qualcomm devices discarding buffer on + // Activity restore. + private boolean mInvalidateRootViewOnNextDraw; + // The framework may temporarily detach our container view, for example during layout if // we are a child of a ListView. This may cause many toggles of View focus, which we suppress // when in this state. @@ -2153,6 +2157,8 @@ } private void setWindowVisibilityInternal(boolean visible) { + mInvalidateRootViewOnNextDraw |= Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP + && visible && !mIsWindowVisible; mIsWindowVisible = visible; if (!isDestroyed()) nativeSetWindowVisibility(mNativeAwContents, mIsWindowVisible); } @@ -2672,6 +2678,11 @@ mScrollOffsetManager.computeMaximumVerticalScrollOffset())) { postInvalidateOnAnimation(); } + + if (mInvalidateRootViewOnNextDraw) { + mContainerView.getRootView().invalidate(); + mInvalidateRootViewOnNextDraw = false; + } } @Override diff -Nru chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java --- chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java 2015-06-22 22:56:44.000000000 +0000 @@ -271,11 +271,6 @@ } } - @Override - public void loadingStateChanged() { - mContentsClient.onReceivedTitle(mAwContents.getTitle()); - } - private static class GetDisplayNameTask extends AsyncTask { final int mProcessId; final int mRenderId; diff -Nru chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java --- chromium-browser-43.0.2357.81/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java 2015-06-22 22:56:44.000000000 +0000 @@ -41,9 +41,4 @@ @Override @CalledByNative public abstract void navigationStateChanged(int flags); - - // Not an override, because WebContentsDelegateAndroid maps this call - // into onLoad{Started|Stopped}. - @CalledByNative - public abstract void loadingStateChanged(); } diff -Nru chromium-browser-43.0.2357.81/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java chromium-browser-43.0.2357.130/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java --- chromium-browser-43.0.2357.81/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java 2015-06-22 22:56:44.000000000 +0000 @@ -320,23 +320,4 @@ } }); } - - // See http://crbug.com/481570 - @SmallTest - public void testTitleUpdatedWhenGoingBack() throws Throwable { - final TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishedHelper = - mContentsClient.getOnPageFinishedHelper(); - NavigationHistory list = getNavigationHistory(mAwContents); - assertEquals(0, list.getEntryCount()); - - final String page1Url = addPage1ToServer(mWebServer); - final String page2Url = addPage2ToServer(mWebServer); - - loadUrlSync(mAwContents, onPageFinishedHelper, page1Url); - loadUrlSync(mAwContents, onPageFinishedHelper, page2Url); - assertEquals(PAGE_2_TITLE, mContentsClient.getUpdatedTitle()); - HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getWebContents(), - onPageFinishedHelper); - assertEquals(PAGE_1_TITLE, mContentsClient.getUpdatedTitle()); - } } diff -Nru chromium-browser-43.0.2357.81/android_webview/lib/main/aw_main_delegate.cc chromium-browser-43.0.2357.130/android_webview/lib/main/aw_main_delegate.cc --- chromium-browser-43.0.2357.81/android_webview/lib/main/aw_main_delegate.cc 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/lib/main/aw_main_delegate.cc 2015-06-22 22:56:44.000000000 +0000 @@ -90,6 +90,9 @@ // WebView does not yet support screen orientation locking. cl->AppendSwitch(switches::kDisableScreenOrientationLock); + // WebView does not currently support the Permissions API (crbug.com/490120) + cl->AppendSwitch(switches::kDisablePermissionsAPI); + // WebView does not (yet) save Chromium data during shutdown, so add setting // for Chrome to aggressively persist DOM Storage to minimize data loss. // http://crbug.com/479767 diff -Nru chromium-browser-43.0.2357.81/android_webview/native/aw_web_contents_delegate.cc chromium-browser-43.0.2357.130/android_webview/native/aw_web_contents_delegate.cc --- chromium-browser-43.0.2357.81/android_webview/native/aw_web_contents_delegate.cc 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/native/aw_web_contents_delegate.cc 2015-06-22 22:56:44.000000000 +0000 @@ -204,18 +204,6 @@ } } -void AwWebContentsDelegate::LoadingStateChanged(WebContents* source, - bool to_different_document) { - // Page title may have changed, need to inform the embedder. - // |source| may be null if loading has started. - JNIEnv* env = AttachCurrentThread(); - - ScopedJavaLocalRef java_delegate = GetJavaDelegate(env); - if (java_delegate.obj()) { - Java_AwWebContentsDelegate_loadingStateChanged(env, java_delegate.obj()); - } -} - void AwWebContentsDelegate::RequestMediaAccessPermission( WebContents* web_contents, const content::MediaStreamRequest& request, diff -Nru chromium-browser-43.0.2357.81/android_webview/native/aw_web_contents_delegate.h chromium-browser-43.0.2357.130/android_webview/native/aw_web_contents_delegate.h --- chromium-browser-43.0.2357.81/android_webview/native/aw_web_contents_delegate.h 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/android_webview/native/aw_web_contents_delegate.h 2015-06-22 22:56:44.000000000 +0000 @@ -50,8 +50,6 @@ void CloseContents(content::WebContents* source) override; void ActivateContents(content::WebContents* contents) override; - void LoadingStateChanged(content::WebContents* source, - bool to_different_document) override; void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, diff -Nru chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos.cc chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos.cc --- chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos.cc 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos.cc 2015-06-22 22:56:44.000000000 +0000 @@ -17,6 +17,9 @@ casting_session_count_(0), power_manager_client_(power_manager_client) { DCHECK(power_manager_client); +#if defined(USE_OZONE) + is_initial_configuration_ = true; +#endif } ProjectingObserver::~ProjectingObserver() {} @@ -33,6 +36,13 @@ } } +#if defined(USE_OZONE) + if (is_initial_configuration_) { + is_initial_configuration_ = false; + return; + } +#endif + SetIsProjecting(); } diff -Nru chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos.h chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos.h --- chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos.h 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos.h 2015-06-22 22:56:44.000000000 +0000 @@ -45,6 +45,14 @@ // Weak pointer to the DBusClient PowerManagerClient; chromeos::PowerManagerClient* power_manager_client_; +#if defined(USE_OZONE) + // TODO(dnicoara) Remove once merged to M43. + // Used to skip the first call to the power management during the initial + // display configuration to avoid changing power settings due to possibly + // invalid display configuration. + bool is_initial_configuration_; +#endif + DISALLOW_COPY_AND_ASSIGN(ProjectingObserver); }; diff -Nru chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos_unittest.cc chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos_unittest.cc --- chromium-browser-43.0.2357.81/ash/display/projecting_observer_chromeos_unittest.cc 2015-05-25 19:00:22.000000000 +0000 +++ chromium-browser-43.0.2357.130/ash/display/projecting_observer_chromeos_unittest.cc 2015-06-22 22:56:44.000000000 +0000 @@ -30,6 +30,14 @@ ~ProjectingObserverTest() override {} +#if defined(USE_OZONE) + void SetUp() override { + // First configuration event is ignored on Ozone to work around setting the + // wrong power state during startup. + observer_.OnDisplayModeChanged(std::vector()); + } +#endif + protected: chromeos::FakePowerManagerClient fake_power_client_; ProjectingObserver observer_; diff -Nru chromium-browser-43.0.2357.81/build/util/LASTCHANGE chromium-browser-43.0.2357.130/build/util/LASTCHANGE --- chromium-browser-43.0.2357.81/build/util/LASTCHANGE 2015-05-25 19:18:02.000000000 +0000 +++ chromium-browser-43.0.2357.130/build/util/LASTCHANGE 2015-06-22 22:57:17.000000000 +0000 @@ -1 +1 @@ -LASTCHANGE=4d096306deb9e86953c81f08454dd6db07b406b5 +LASTCHANGE=aa8b82d8e6337201aa9477f25c603c289b5d7d0e diff -Nru chromium-browser-43.0.2357.81/build/util/LASTCHANGE.blink chromium-browser-43.0.2357.130/build/util/LASTCHANGE.blink --- chromium-browser-43.0.2357.81/build/util/LASTCHANGE.blink 2015-05-25 19:18:02.000000000 +0000 +++ chromium-browser-43.0.2357.130/build/util/LASTCHANGE.blink 2015-06-22 22:57:17.000000000 +0000 @@ -1 +1 @@ -LASTCHANGE=195776 +LASTCHANGE=197431 diff -Nru chromium-browser-43.0.2357.81/cc/output/renderer_pixeltest.cc chromium-browser-43.0.2357.130/cc/output/renderer_pixeltest.cc --- chromium-browser-43.0.2357.81/cc/output/renderer_pixeltest.cc 2015-05-25 19:17:38.000000000 +0000 +++ chromium-browser-43.0.2357.130/cc/output/renderer_pixeltest.cc 2015-06-22 22:56:44.000000000 +0000 @@ -2485,6 +2485,114 @@ ExactPixelComparator(true))); } +// This disables filtering by setting |nearest_neighbor| to true on the +// TextureDrawQuad. +TYPED_TEST(SoftwareRendererPixelTest, TextureDrawQuadNearestNeighbor) { + gfx::Rect viewport(this->device_viewport_size_); + bool nearest_neighbor = true; + + SkBitmap bitmap; + bitmap.allocN32Pixels(2, 2); + { + SkAutoLockPixels lock(bitmap); + SkCanvas canvas(bitmap); + canvas.drawPoint(0, 0, SK_ColorGREEN); + canvas.drawPoint(0, 1, SK_ColorBLUE); + canvas.drawPoint(1, 0, SK_ColorBLUE); + canvas.drawPoint(1, 1, SK_ColorGREEN); + } + + gfx::Size tile_size(2, 2); + ResourceProvider::ResourceId resource = + this->resource_provider_->CreateResource( + tile_size, GL_CLAMP_TO_EDGE, ResourceProvider::TEXTURE_HINT_IMMUTABLE, + RGBA_8888); + + { + SkAutoLockPixels lock(bitmap); + this->resource_provider_->CopyToResource( + resource, static_cast(bitmap.getPixels()), tile_size); + } + + RenderPassId id(1, 1); + gfx::Transform transform_to_root; + scoped_ptr pass = + CreateTestRenderPass(id, viewport, transform_to_root); + + gfx::Transform content_to_target_transform; + SharedQuadState* shared_state = CreateTestSharedQuadState( + content_to_target_transform, viewport, pass.get()); + + float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + TextureDrawQuad* quad = pass->CreateAndAppendDrawQuad(); + quad->SetNew(shared_state, viewport, gfx::Rect(), viewport, resource, false, + gfx::PointF(0, 0), gfx::PointF(1, 1), SK_ColorBLACK, + vertex_opacity, false, nearest_neighbor); + + RenderPassList pass_list; + pass_list.push_back(pass.Pass()); + + EXPECT_TRUE(this->RunPixelTest( + &pass_list, + base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")), + FuzzyPixelComparator(false, 2.f, 0.f, 256.f, 256, 0.f))); +} + +// This ensures filtering is enabled by setting |nearest_neighbor| to false on +// the TextureDrawQuad. +TYPED_TEST(SoftwareRendererPixelTest, TextureDrawQuadLinear) { + gfx::Rect viewport(this->device_viewport_size_); + bool nearest_neighbor = false; + + SkBitmap bitmap; + bitmap.allocN32Pixels(2, 2); + { + SkAutoLockPixels lock(bitmap); + SkCanvas canvas(bitmap); + canvas.drawPoint(0, 0, SK_ColorGREEN); + canvas.drawPoint(0, 1, SK_ColorBLUE); + canvas.drawPoint(1, 0, SK_ColorBLUE); + canvas.drawPoint(1, 1, SK_ColorGREEN); + } + + gfx::Size tile_size(2, 2); + ResourceProvider::ResourceId resource = + this->resource_provider_->CreateResource( + tile_size, GL_CLAMP_TO_EDGE, ResourceProvider::TEXTURE_HINT_IMMUTABLE, + RGBA_8888); + + { + SkAutoLockPixels lock(bitmap); + this->resource_provider_->CopyToResource( + resource, static_cast(bitmap.getPixels()), tile_size); + } + + RenderPassId id(1, 1); + gfx::Transform transform_to_root; + scoped_ptr pass = + CreateTestRenderPass(id, viewport, transform_to_root); + + gfx::Transform content_to_target_transform; + SharedQuadState* shared_state = CreateTestSharedQuadState( + content_to_target_transform, viewport, pass.get()); + + float vertex_opacity[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + TextureDrawQuad* quad = pass->CreateAndAppendDrawQuad(); + quad->SetNew(shared_state, viewport, gfx::Rect(), viewport, resource, false, + gfx::PointF(0, 0), gfx::PointF(1, 1), SK_ColorBLACK, + vertex_opacity, false, nearest_neighbor); + + RenderPassList pass_list; + pass_list.push_back(pass.Pass()); + + // Allow for a small amount of error as the blending alogrithm used by Skia is + // affected by the offset in the expanded rect. + EXPECT_TRUE(this->RunPixelTest( + &pass_list, + base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers_linear.png")), + FuzzyPixelComparator(false, 100.f, 0.f, 16.f, 16.f, 0.f))); +} + TYPED_TEST(SoftwareRendererPixelTest, PictureDrawQuadNonIdentityScale) { gfx::Size pile_tile_size(1000, 1000); gfx::Rect viewport(this->device_viewport_size_); diff -Nru chromium-browser-43.0.2357.81/cc/output/software_renderer.cc chromium-browser-43.0.2357.130/cc/output/software_renderer.cc --- chromium-browser-43.0.2357.81/cc/output/software_renderer.cc 2015-05-25 19:17:38.000000000 +0000 +++ chromium-browser-43.0.2357.130/cc/output/software_renderer.cc 2015-06-22 22:56:44.000000000 +0000 @@ -455,6 +455,8 @@ background_paint.setColor(quad->background_color); current_canvas_->drawRect(quad_rect, background_paint); } + current_paint_.setFilterQuality( + quad->nearest_neighbor ? kNone_SkFilterQuality : kLow_SkFilterQuality); SkShader::TileMode tile_mode = WrapModeToTileMode(lock.wrap_mode()); if (tile_mode != SkShader::kClamp_TileMode) { SkMatrix matrix; diff -Nru chromium-browser-43.0.2357.81/cc/scheduler/scheduler_state_machine.cc chromium-browser-43.0.2357.130/cc/scheduler/scheduler_state_machine.cc --- chromium-browser-43.0.2357.81/cc/scheduler/scheduler_state_machine.cc 2015-05-25 19:17:38.000000000 +0000 +++ chromium-browser-43.0.2357.130/cc/scheduler/scheduler_state_machine.cc 2015-06-22 22:56:44.000000000 +0000 @@ -841,6 +841,14 @@ // Clear funnels for any actions we perform during the deadline. request_swap_funnel_ = false; + +#if defined(OS_ANDROID) + // Allow one PrepareTiles per draw for synchronous compositor. + if (settings_.using_synchronous_renderer_compositor) { + if (prepare_tiles_funnel_ > 0) + prepare_tiles_funnel_--; + } +#endif } void SchedulerStateMachine::OnBeginImplFrameIdle() { Binary files /tmp/yhvOFVKOIr/chromium-browser-43.0.2357.81/cc/test/data/four_blue_green_checkers_linear.png and /tmp/wLkdctsczn/chromium-browser-43.0.2357.130/cc/test/data/four_blue_green_checkers_linear.png differ diff -Nru chromium-browser-43.0.2357.81/chrome/browser/extensions/extension_service_unittest.cc chromium-browser-43.0.2357.130/chrome/browser/extensions/extension_service_unittest.cc --- chromium-browser-43.0.2357.81/chrome/browser/extensions/extension_service_unittest.cc 2015-05-25 19:17:39.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/extensions/extension_service_unittest.cc 2015-06-22 22:56:46.000000000 +0000 @@ -196,7 +196,6 @@ const char theme_crx[] = "iamefpfkojoapidjnbafmgkgncegbkad"; const char theme2_crx[] = "pjpgmfcmabopnnfonnhmdjglfpjjfkbf"; const char permissions_crx[] = "eagpmdpfmaekmmcejjbmjoecnejeiiin"; -const char unpacked[] = "cbcdidchbppangcjoddlpdjlenngjldk"; const char updates_from_webstore[] = "akjooamlhcgeopfifcmlggaebeocgokj"; const char permissions_blocklist[] = "noffkehfcaggllbcojjbopcmlhcnhcdn"; @@ -2325,49 +2324,6 @@ ASSERT_TRUE(base::DeleteFile(theme_file, false)); // Not recursive. } -// Tests that we can change the ID of an unpacked extension by adding a key -// to its manifest. -TEST_F(ExtensionServiceTest, UnpackedExtensionCanChangeID) { - InitializeEmptyExtensionService(); - - base::ScopedTempDir temp; - ASSERT_TRUE(temp.CreateUniqueTempDir()); - - base::FilePath extension_path = temp.path(); - base::FilePath manifest_path = - extension_path.Append(extensions::kManifestFilename); - base::FilePath manifest_no_key = - data_dir().AppendASCII("unpacked").AppendASCII("manifest_no_key.json"); - - base::FilePath manifest_with_key = - data_dir().AppendASCII("unpacked").AppendASCII("manifest_with_key.json"); - - ASSERT_TRUE(base::PathExists(manifest_no_key)); - ASSERT_TRUE(base::PathExists(manifest_with_key)); - - // Load the unpacked extension with no key. - base::CopyFile(manifest_no_key, manifest_path); - extensions::UnpackedInstaller::Create(service())->Load(extension_path); - - base::RunLoop().RunUntilIdle(); - EXPECT_EQ(0u, GetErrors().size()); - ASSERT_EQ(1u, loaded_.size()); - EXPECT_EQ(1u, registry()->enabled_extensions().size()); - - // Add the key to the manifest. - base::CopyFile(manifest_with_key, manifest_path); - loaded_.clear(); - - // Reload the extensions. - service()->ReloadExtensionsForTest(); - const Extension* extension = service()->GetExtensionById(unpacked, false); - EXPECT_EQ(unpacked, extension->id()); - ASSERT_EQ(1u, loaded_.size()); - - // TODO(jstritar): Right now this just makes sure we don't crash and burn, but - // we should also test that preferences are preserved. -} - #if defined(OS_POSIX) TEST_F(ExtensionServiceTest, UnpackedExtensionMayContainSymlinkedFiles) { base::FilePath source_data_dir = diff -Nru chromium-browser-43.0.2357.81/chrome/browser/extensions/installed_loader.cc chromium-browser-43.0.2357.130/chrome/browser/extensions/installed_loader.cc --- chromium-browser-43.0.2357.81/chrome/browser/extensions/installed_loader.cc 2015-05-25 19:17:39.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/extensions/installed_loader.cc 2015-06-22 22:56:46.000000000 +0000 @@ -169,6 +169,12 @@ } void InstalledLoader::Load(const ExtensionInfo& info, bool write_to_prefs) { + // TODO(asargent): add a test to confirm that we can't load extensions if + // their ID in preferences does not match the extension's actual ID. + if (invalid_extensions_.find(info.extension_path) != + invalid_extensions_.end()) + return; + std::string error; scoped_refptr extension(NULL); if (info.extension_manifest) { @@ -269,7 +275,8 @@ GetCreationFlags(info), &error)); - if (!extension.get()) { + if (!extension.get() || extension->id() != info->extension_id) { + invalid_extensions_.insert(info->extension_path); ExtensionErrorReporter::GetInstance()->ReportLoadError( info->extension_path, error, diff -Nru chromium-browser-43.0.2357.81/chrome/browser/extensions/installed_loader.h chromium-browser-43.0.2357.130/chrome/browser/extensions/installed_loader.h --- chromium-browser-43.0.2357.81/chrome/browser/extensions/installed_loader.h 2015-05-25 19:00:24.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/extensions/installed_loader.h 2015-06-16 19:01:17.000000000 +0000 @@ -5,6 +5,10 @@ #ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ +#include + +#include "base/files/file_path.h" + class ExtensionService; namespace extensions { @@ -37,6 +41,9 @@ ExtensionRegistry* extension_registry_; ExtensionPrefs* extension_prefs_; + + // Paths to invalid extension manifests, which should not be loaded. + std::set invalid_extensions_; }; } // namespace extensions diff -Nru chromium-browser-43.0.2357.81/chrome/browser/resources/extensions/extension_list.js chromium-browser-43.0.2357.130/chrome/browser/resources/extensions/extension_list.js --- chromium-browser-43.0.2357.81/chrome/browser/resources/extensions/extension_list.js 2015-05-25 19:17:39.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/resources/extensions/extension_list.js 2015-06-22 22:56:47.000000000 +0000 @@ -664,14 +664,14 @@ !extension.optionsPage.openInTab); // The 'View in Web Store/View Web Site' link. - var siteLinkEnabled = !!extension.homepageUrl && + var siteLinkEnabled = !!extension.homePage.url && !this.enableAppInfoDialog_; this.updateVisibility_(row, '.site-link', siteLinkEnabled, function(item) { - item.href = extension.homepageUrl; + item.href = extension.homePage.url; item.textContent = loadTimeData.getString( - extension.homepageProvided ? 'extensionSettingsVisitWebsite' : - 'extensionSettingsVisitWebStore'); + extension.homePage.specified ? 'extensionSettingsVisitWebsite' : + 'extensionSettingsVisitWebStore'); }); var isUnpacked = diff -Nru chromium-browser-43.0.2357.81/chrome/browser/resources/gaia_auth_host/authenticator.js chromium-browser-43.0.2357.130/chrome/browser/resources/gaia_auth_host/authenticator.js --- chromium-browser-43.0.2357.81/chrome/browser/resources/gaia_auth_host/authenticator.js 2015-05-25 19:17:39.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/resources/gaia_auth_host/authenticator.js 2015-06-22 22:56:47.000000000 +0000 @@ -449,10 +449,13 @@ } else if (this.samlHandler_.scrapedPasswordCount == 0) { if (this.noPasswordCallback) { this.noPasswordCallback(this.email_); - } else { - console.error('Authenticator: No password scraped for SAML.'); + return; } - return; + + // Fall through to finish the auth flow even if this.needPassword + // is true. This is because the flag is used as an intention to get + // password when it is available but not a mandatory requirement. + console.warn('Authenticator: No password scraped for SAML.'); } else if (this.needPassword) { if (this.confirmPasswordCallback) { // Confirm scraped password. The flow follows in diff -Nru chromium-browser-43.0.2357.81/chrome/browser/resources/google_now/background.js chromium-browser-43.0.2357.130/chrome/browser/resources/google_now/background.js --- chromium-browser-43.0.2357.81/chrome/browser/resources/google_now/background.js 2015-05-25 19:17:39.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/resources/google_now/background.js 2015-06-22 22:56:47.000000000 +0000 @@ -202,6 +202,7 @@ // Add error processing to API calls. wrapper.instrumentChromeApiFunction('gcm.onMessage.addListener', 0); wrapper.instrumentChromeApiFunction('gcm.register', 1); +wrapper.instrumentChromeApiFunction('gcm.unregister', 0); wrapper.instrumentChromeApiFunction('metricsPrivate.getVariationParams', 1); wrapper.instrumentChromeApiFunction('notifications.clear', 1); wrapper.instrumentChromeApiFunction('notifications.create', 2); @@ -1027,7 +1028,8 @@ */ function initialize() { recordEvent(GoogleNowEvent.EXTENSION_START); - registerForGcm(); + // TODO(skare): Reenable, after signin. + unregisterFromGcm(); onStateChange(); } @@ -1310,6 +1312,24 @@ }); } +/** + * Unregisters from GCM if previously registered. + */ +function unregisterFromGcm() { + fillFromChromeLocalStorage({gcmRegistrationId: undefined}) + .then(function(items) { + if (items.gcmRegistrationId) { + console.log('Unregistering from gcm.'); + instrumented.gcm.unregister(function() { + if (!chrome.runtime.lastError) { + chrome.storage.local.remove( + ['gcmNotificationKey', 'gcmRegistrationId']); + } + }); + } + }); +} + /** * Polls the optin state. * Sometimes we get the response to the opted in result too soon during diff -Nru chromium-browser-43.0.2357.81/chrome/browser/ui/libgtk2ui/gtk2_ui.cc chromium-browser-43.0.2357.130/chrome/browser/ui/libgtk2ui/gtk2_ui.cc --- chromium-browser-43.0.2357.81/chrome/browser/ui/libgtk2ui/gtk2_ui.cc 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/ui/libgtk2ui/gtk2_ui.cc 2015-06-22 22:56:47.000000000 +0000 @@ -4,10 +4,10 @@ #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" -#include #include #include +#include #include "base/command_line.h" #include "base/debug/leak_annotations.h" @@ -49,6 +49,7 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/gfx/skia_util.h" +#include "ui/gfx/x/x11_types.h" #include "ui/resources/grit/ui_resources.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/label_button_border.h" @@ -381,20 +382,27 @@ return params; } -double GetDPI() { +double GetBaseDPI() { + XDisplay* xdisplay = gfx::GetXDisplay(); + int xscreen = DefaultScreen(xdisplay); + return (DisplayHeight(xdisplay, xscreen) * 25.4) / + DisplayHeightMM(xdisplay, xscreen); +} + +double GetFontDPI() { GtkSettings* gtk_settings = gtk_settings_get_default(); CHECK(gtk_settings); gint gtk_dpi = -1; g_object_get(gtk_settings, "gtk-xft-dpi", >k_dpi, NULL); // GTK multiplies the DPI by 1024 before storing it. - return (gtk_dpi > 0) ? gtk_dpi / 1024.0 : 96.0; + return (gtk_dpi > 0) ? gtk_dpi / 1024.0 : GetBaseDPI(); } // Queries GTK for its font DPI setting and returns the number of pixels in a // point. double GetPixelsInPoint(float device_scale_factor) { - double dpi = GetDPI(); + double dpi = GetFontDPI(); // Take device_scale_factor into account — if Chrome already scales the // entire UI up by 2x, we should not also scale up. @@ -1426,10 +1434,9 @@ } float Gtk2UI::GetDeviceScaleFactor() const { - const int kCSSDefaultDPI = 96; - float scale = GetDPI() / kCSSDefaultDPI; - // Round to 2 decimals, e.g. to 1.33. - return roundf(scale * 100) / 100; + float scale = GetFontDPI() / GetBaseDPI(); + // Round to 1 decimal, e.g. to 1.4. + return roundf(scale * 10) / 10; } } // namespace libgtk2ui diff -Nru chromium-browser-43.0.2357.81/chrome/browser/ui/startup/default_browser_prompt.cc chromium-browser-43.0.2357.130/chrome/browser/ui/startup/default_browser_prompt.cc --- chromium-browser-43.0.2357.81/chrome/browser/ui/startup/default_browser_prompt.cc 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/ui/startup/default_browser_prompt.cc 2015-06-22 22:56:47.000000000 +0000 @@ -14,6 +14,7 @@ #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -194,8 +195,28 @@ ShellIntegration::SET_DEFAULT_INTERACTIVE)); } -void CheckDefaultBrowserCallback(chrome::HostDesktopType desktop_type) { - if (ShellIntegration::GetDefaultBrowser() == ShellIntegration::NOT_DEFAULT) { +void ResetCheckDefaultBrowserPrefOnUIThread( + const base::FilePath& profile_path) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + Profile* profile = + g_browser_process->profile_manager()->GetProfileByPath(profile_path); + if (profile) + profile->GetPrefs()->SetBoolean(prefs::kCheckDefaultBrowser, true); +} + +void CheckDefaultBrowserOnFileThread(const base::FilePath& profile_path, + bool show_prompt, + chrome::HostDesktopType desktop_type) { + DCHECK_CURRENTLY_ON(content::BrowserThread::FILE); + ShellIntegration::DefaultWebClientState state = + ShellIntegration::GetDefaultBrowser(); + if (state == ShellIntegration::IS_DEFAULT) { + // Notify the user in the future if Chrome ceases to be the user's chosen + // default browser. + content::BrowserThread::PostTask( + content::BrowserThread::UI, FROM_HERE, + base::Bind(&ResetCheckDefaultBrowserPrefOnUIThread, profile_path)); + } else if (show_prompt && state == ShellIntegration::NOT_DEFAULT) { ShellIntegration::DefaultWebClientSetPermission default_change_mode = ShellIntegration::CanSetAsDefaultBrowser(); @@ -218,12 +239,13 @@ void ShowDefaultBrowserPrompt(Profile* profile, HostDesktopType desktop_type) { // We do not check if we are the default browser if: - // - The user said "don't ask me again" on the infobar earlier. // - There is a policy in control of this setting. + // We check if we are the default browser but do not prompt if: + // - The user said "don't ask me again" on the infobar earlier. // - The "suppress_default_browser_prompt_for_version" master preference is // set to the current version. - if (!profile->GetPrefs()->GetBoolean(prefs::kCheckDefaultBrowser)) - return; + bool show_prompt = + profile->GetPrefs()->GetBoolean(prefs::kCheckDefaultBrowser); if (g_browser_process->local_state()->IsManagedPreference( prefs::kDefaultBrowserSettingEnabled)) { @@ -240,20 +262,23 @@ return; } - const std::string disable_version_string = - g_browser_process->local_state()->GetString( - prefs::kBrowserSuppressDefaultBrowserPrompt); - const Version disable_version(disable_version_string); - DCHECK(disable_version_string.empty() || disable_version.IsValid()); - if (disable_version.IsValid()) { - const chrome::VersionInfo version_info; - if (disable_version.Equals(Version(version_info.Version()))) - return; + if (show_prompt) { + const std::string disable_version_string = + g_browser_process->local_state()->GetString( + prefs::kBrowserSuppressDefaultBrowserPrompt); + const Version disable_version(disable_version_string); + DCHECK(disable_version_string.empty() || disable_version.IsValid()); + if (disable_version.IsValid()) { + const chrome::VersionInfo version_info; + if (disable_version.Equals(Version(version_info.Version()))) + show_prompt = false; + } } content::BrowserThread::PostTask( content::BrowserThread::FILE, FROM_HERE, - base::Bind(&CheckDefaultBrowserCallback, desktop_type)); + base::Bind(&CheckDefaultBrowserOnFileThread, profile->GetPath(), + show_prompt, desktop_type)); } #if !defined(OS_WIN) diff -Nru chromium-browser-43.0.2357.81/chrome/browser/ui/webui/options/browser_options_handler.cc chromium-browser-43.0.2357.130/chrome/browser/ui/webui/options/browser_options_handler.cc --- chromium-browser-43.0.2357.81/chrome/browser/ui/webui/options/browser_options_handler.cc 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/browser/ui/webui/options/browser_options_handler.cc 2015-06-22 22:56:48.000000000 +0000 @@ -1147,6 +1147,10 @@ if (state == ShellIntegration::STATE_IS_DEFAULT) { status_string_id = IDS_OPTIONS_DEFAULTBROWSER_DEFAULT; + // Notify the user in the future if Chrome ceases to be the user's chosen + // default browser. + PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); + prefs->SetBoolean(prefs::kCheckDefaultBrowser, true); } else if (state == ShellIntegration::STATE_NOT_DEFAULT) { if (ShellIntegration::CanSetAsDefaultBrowser() == ShellIntegration::SET_DEFAULT_NOT_ALLOWED) { diff -Nru chromium-browser-43.0.2357.81/chrome/chrome_installer.gypi chromium-browser-43.0.2357.130/chrome/chrome_installer.gypi --- chromium-browser-43.0.2357.81/chrome/chrome_installer.gypi 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/chrome_installer.gypi 2015-06-22 22:56:48.000000000 +0000 @@ -97,6 +97,7 @@ 'installer/setup/compat_checks_unittest.cc', 'installer/setup/setup_constants.cc', 'installer/util/advanced_firewall_manager_win_unittest.cc', + 'installer/util/beacons_unittest.cc', 'installer/util/callback_work_item_unittest.cc', 'installer/util/channel_info_unittest.cc', 'installer/util/copy_tree_work_item_unittest.cc', @@ -135,6 +136,8 @@ 'installer/util/self_cleaning_temp_dir_unittest.cc', 'installer/util/set_reg_value_work_item_unittest.cc', 'installer/util/shell_util_unittest.cc', + 'installer/util/test_app_registration_data.cc', + 'installer/util/test_app_registration_data.h', 'installer/util/uninstall_metrics_unittest.cc', 'installer/util/wmi_unittest.cc', 'installer/util/work_item_list_unittest.cc', diff -Nru chromium-browser-43.0.2357.81/chrome/chrome_installer_util.gypi chromium-browser-43.0.2357.130/chrome/chrome_installer_util.gypi --- chromium-browser-43.0.2357.81/chrome/chrome_installer_util.gypi 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/chrome_installer_util.gypi 2015-06-22 22:56:48.000000000 +0000 @@ -20,6 +20,8 @@ 'installer/util/app_registration_data.h', 'installer/util/auto_launch_util.cc', 'installer/util/auto_launch_util.h', + 'installer/util/beacons.cc', + 'installer/util/beacons.h', 'installer/util/browser_distribution.cc', 'installer/util/browser_distribution.h', 'installer/util/callback_work_item.cc', diff -Nru chromium-browser-43.0.2357.81/chrome/installer/setup/install.cc chromium-browser-43.0.2357.130/chrome/installer/setup/install.cc --- chromium-browser-43.0.2357.81/chrome/installer/setup/install.cc 2015-05-25 19:00:25.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/setup/install.cc 2015-06-16 19:01:18.000000000 +0000 @@ -25,6 +25,7 @@ #include "chrome/installer/setup/install_worker.h" #include "chrome/installer/setup/setup_constants.h" #include "chrome/installer/util/auto_launch_util.h" +#include "chrome/installer/util/beacons.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/create_reg_key_work_item.h" #include "chrome/installer/util/delete_after_reboot_helper.h" @@ -582,6 +583,13 @@ installer_state.target_path()); } } + + if (!installer_state.system_install()) { + DCHECK_EQ(chrome_product->distribution(), + BrowserDistribution::GetDistribution()); + UpdateDefaultBrowserBeaconForPath( + installer_state.target_path().Append(installer::kChromeExe)); + } } installer_state.UpdateStage(installer::REMOVING_OLD_VERSIONS); @@ -617,6 +625,11 @@ CreateOrUpdateShortcuts( chrome_exe, chrome, prefs, level, INSTALL_SHORTCUT_REPLACE_EXISTING); RegisterChromeOnMachine(installer_state, chrome, false); + + UpdateOsUpgradeBeacon(installer_state.system_install(), + BrowserDistribution::GetDistribution()); + if (!installer_state.system_install()) + UpdateDefaultBrowserBeaconForPath(chrome_exe); } } @@ -644,6 +657,8 @@ base::FilePath chrome_exe(installation_root.Append(kChromeExe)); CreateOrUpdateShortcuts( chrome_exe, chrome, prefs, CURRENT_USER, install_operation); + + UpdateDefaultBrowserBeaconForPath(chrome_exe); } } // namespace installer diff -Nru chromium-browser-43.0.2357.81/chrome/installer/setup/install_worker.cc chromium-browser-43.0.2357.130/chrome/installer/setup/install_worker.cc --- chromium-browser-43.0.2357.81/chrome/installer/setup/install_worker.cc 2015-05-25 19:00:25.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/setup/install_worker.cc 2015-06-22 22:56:48.000000000 +0000 @@ -61,7 +61,7 @@ // on user login by way of Active Setup. Increase this value if the work done // in setup_main.cc's handling of kConfigureUserSettings changes and should be // executed again for all users. -const wchar_t kActiveSetupVersion[] = L"24,0,0,0"; +const wchar_t kActiveSetupVersion[] = L"43,0,0,0"; // Although the UUID of the ChromeFrame class is used for the "current" value, // this is done only as a convenience; there is no need for the GUID of the Low diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/beacons.cc chromium-browser-43.0.2357.130/chrome/installer/util/beacons.cc --- chromium-browser-43.0.2357.81/chrome/installer/util/beacons.cc 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/beacons.cc 2015-06-16 19:01:18.000000000 +0000 @@ -0,0 +1,151 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/installer/util/beacons.h" + +#include "base/win/registry.h" +#include "base/win/win_util.h" +#include "chrome/installer/util/app_registration_data.h" +#include "chrome/installer/util/browser_distribution.h" +#include "chrome/installer/util/install_util.h" +#include "chrome/installer/util/shell_util.h" + +void UpdateDefaultBrowserBeaconForPath(const base::FilePath& chrome_exe) { + // Getting Chrome's default state causes the beacon to be updated via a call + // to UpdateDefaultBrowserBeaconWithState below. + ignore_result(ShellUtil::GetChromeDefaultStateFromPath(chrome_exe)); +} + +void UpdateDefaultBrowserBeaconWithState( + const base::FilePath& chrome_exe, + BrowserDistribution* distribution, + ShellUtil::DefaultState default_state) { + const bool system_install = !InstallUtil::IsPerUserInstall(chrome_exe); + const AppRegistrationData& registration_data = + distribution->GetAppRegistrationData(); + switch (default_state) { + case ShellUtil::NOT_DEFAULT: + installer_util::MakeFirstNotDefaultBeacon(system_install, + registration_data)->Update(); + break; + case ShellUtil::IS_DEFAULT: + installer_util::MakeLastWasDefaultBeacon(system_install, + registration_data)->Update(); + installer_util::MakeFirstNotDefaultBeacon(system_install, + registration_data)->Remove(); + break; + case ShellUtil::UNKNOWN_DEFAULT: + break; + } +} + +void UpdateOsUpgradeBeacon(bool system_install, + BrowserDistribution* distribution) { + installer_util::MakeLastOsUpgradeBeacon( + system_install, distribution->GetAppRegistrationData())->Update(); +} + +namespace installer_util { + +scoped_ptr MakeLastOsUpgradeBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon(L"LastOsUpgrade", Beacon::BeaconType::LAST, + Beacon::BeaconScope::PER_INSTALL, + system_install, registration_data)); +} + +scoped_ptr MakeLastWasDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon(L"LastWasDefault", Beacon::BeaconType::LAST, + Beacon::BeaconScope::PER_USER, + system_install, registration_data)); +} + +scoped_ptr MakeFirstNotDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data) { + return make_scoped_ptr(new Beacon( + L"FirstNotDefault", Beacon::BeaconType::FIRST, + Beacon::BeaconScope::PER_USER, system_install, registration_data)); +} + +// Beacon ---------------------------------------------------------------------- + +Beacon::Beacon(base::StringPiece16 name, + BeaconType type, + BeaconScope scope, + bool system_install, + const AppRegistrationData& registration_data) + : type_(type), + root_(system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER), + scope_(scope) { + Initialize(name, system_install, registration_data); +} + +Beacon::~Beacon() { +} + +void Beacon::Update() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_QUERY_VALUE | KEY_SET_VALUE; + base::win::RegKey key; + + // Nothing to update if the key couldn't be created. This should only be the + // case for a developer build. + if (key.Create(root_, key_path_.c_str(), kAccess) != ERROR_SUCCESS) + return; + + // Nothing to do if this beacon is tracking the first occurrence of an event + // that has already been recorded. + if (type_ == BeaconType::FIRST && key.HasValue(value_name_.c_str())) + return; + + int64_t now(base::Time::Now().ToInternalValue()); + key.WriteValue(value_name_.c_str(), &now, sizeof(now), REG_QWORD); +} + +void Beacon::Remove() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_SET_VALUE; + base::win::RegKey key; + + if (key.Open(root_, key_path_.c_str(), kAccess) == ERROR_SUCCESS) + key.DeleteValue(value_name_.c_str()); +} + +base::Time Beacon::Get() { + const REGSAM kAccess = KEY_WOW64_32KEY | KEY_QUERY_VALUE; + base::win::RegKey key; + int64_t now; + + if (key.Open(root_, key_path_.c_str(), kAccess) != ERROR_SUCCESS || + key.ReadInt64(value_name_.c_str(), &now) != ERROR_SUCCESS) { + return base::Time(); + } + + return base::Time::FromInternalValue(now); +} + +void Beacon::Initialize(base::StringPiece16 name, + bool system_install, + const AppRegistrationData& registration_data) { + // When possible, beacons are located in the app's ClientState key. Per-user + // beacons for a per-machine install are located in a beacon-specific sub-key + // of the app's ClientStateMedium key. + if (!system_install || scope_ == BeaconScope::PER_INSTALL) { + key_path_ = registration_data.GetStateKey(); + value_name_ = name.as_string(); + } else { + key_path_ = registration_data.GetStateMediumKey(); + key_path_.push_back(L'\\'); + key_path_.append(name.data(), name.size()); + // This should never fail. If it does, the beacon will be written in the + // key's default value, which is okay since the majority case is likely a + // machine with a single user. + if (!base::win::GetUserSidString(&value_name_)) + NOTREACHED(); + } +} + +} // namespace installer_util diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/beacons.h chromium-browser-43.0.2357.130/chrome/installer/util/beacons.h --- chromium-browser-43.0.2357.81/chrome/installer/util/beacons.h 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/beacons.h 2015-06-16 19:01:18.000000000 +0000 @@ -0,0 +1,126 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_INSTALLER_UTIL_BEACONS_H_ +#define CHROME_INSTALLER_UTIL_BEACONS_H_ + +#include + +#include "base/macros.h" +#include "base/memory/scoped_ptr.h" +#include "base/strings/string16.h" +#include "base/strings/string_piece.h" +#include "base/time/time.h" +#include "chrome/installer/util/shell_util.h" + +class AppRegistrationData; +class BrowserDistribution; + +namespace base { +class FilePath; +} + +// Checks the default state of the browser for the current user and updates the +// appropriate beacon (last was default or first not default). +void UpdateDefaultBrowserBeaconForPath(const base::FilePath& chrome_exe); + +// Updates the last was default or first not default beacon for the current user +// based on |default_state|. +void UpdateDefaultBrowserBeaconWithState(const base::FilePath& chrome_exe, + BrowserDistribution* distribution, + ShellUtil::DefaultState default_state); + +// Updates the last OS upgrade beacon for the install. +void UpdateOsUpgradeBeacon(bool system_install, + BrowserDistribution* distribution); + +namespace installer_util { + +class Beacon; + +// Returns a Beacon representing the last time the machine's OS was ugpraded. +scoped_ptr MakeLastOsUpgradeBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// Returns a Beacon representing the last time Chrome was the user's default +// browser. +scoped_ptr MakeLastWasDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// Returns a Beacon representing the first time Chrome was not the user's +// default browser. +scoped_ptr MakeFirstNotDefaultBeacon( + bool system_install, + const AppRegistrationData& registration_data); + +// A named beacon stored in the registry representing the first or last time at +// which some event took place. A beacon may apply to a per-user event or a +// per-install event. In general, beacons should be created via factory methods +// such as those above. +class Beacon { + public: + enum class BeaconType { + // A beacon that marks the first occurrence of an event. + FIRST, + // A beacon that marks the last occurrence of an event. + LAST, + }; + + enum class BeaconScope { + // A beacon that applies to a per-user event. + PER_USER, + // A beacon that applies to a per-install event. + PER_INSTALL, + }; + + // Creates a beacon named |name| for the product identified by + // |registration_data| installed as either a per-user or a per-machine app + // according to |system_install|. + Beacon(base::StringPiece16 name, + BeaconType type, + BeaconScope scope, + bool system_install, + const AppRegistrationData& registration_data); + ~Beacon(); + + // Updates the beacon. For a type LAST beacon, the current time is written + // unconditionally. For a type FIRST beacon, the beacon is only updated if it + // does not already exist. + void Update(); + + // Removes the beacon. + void Remove(); + + // Returns the beacon's value or a null time if not found. + base::Time Get(); + + private: + // Initializes the key_path_ and value_name_ fields of the beacon. + void Initialize(base::StringPiece16 name, + bool system_install, + const AppRegistrationData& registration_data); + + // The type of beacon. + const BeaconType type_; + + // The root key in the registry where this beacon is stored. + const HKEY root_; + + // The scope of the beacon. + const BeaconScope scope_; + + // The path to the registry key holding the beacon. + base::string16 key_path_; + + // The name of the registry value holding the beacon. + base::string16 value_name_; + + DISALLOW_COPY_AND_ASSIGN(Beacon); +}; + +} // namespace installer_util + +#endif // CHROME_INSTALLER_UTIL_BEACONS_H_ diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/beacons_unittest.cc chromium-browser-43.0.2357.130/chrome/installer/util/beacons_unittest.cc --- chromium-browser-43.0.2357.81/chrome/installer/util/beacons_unittest.cc 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/beacons_unittest.cc 2015-06-16 19:01:18.000000000 +0000 @@ -0,0 +1,277 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/installer/util/beacons.h" + +#include "base/base_paths.h" +#include "base/memory/scoped_vector.h" +#include "base/path_service.h" +#include "base/test/scoped_path_override.h" +#include "base/test/test_reg_util_win.h" +#include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" +#include "base/win/registry.h" +#include "base/win/win_util.h" +#include "chrome/installer/util/browser_distribution.h" +#include "chrome/installer/util/test_app_registration_data.h" +#include "chrome/installer/util/util_constants.h" +#include "testing/gtest/include/gtest/gtest.h" + +using ::testing::Bool; +using ::testing::Combine; +using ::testing::Values; +using BeaconType = installer_util::Beacon::BeaconType; +using BeaconScope = installer_util::Beacon::BeaconScope; + +namespace installer_util { + +// A test fixture that exercises a beacon. +class BeaconTest : public ::testing::TestWithParam< + ::testing::tuple> { + protected: + static const base::char16 kBeaconName[]; + + BeaconTest() + : beacon_type_(::testing::get<0>(GetParam())), + beacon_scope_(::testing::get<1>(GetParam())), + system_install_(::testing::get<2>(GetParam())), + beacon_(kBeaconName, + beacon_type_, + beacon_scope_, + system_install_, + app_registration_data_) { + // Override the registry so that tests can freely push state to it. + registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); + registry_override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE); + } + + TestAppRegistrationData app_registration_data_; + BeaconType beacon_type_; + BeaconScope beacon_scope_; + bool system_install_; + Beacon beacon_; + + private: + registry_util::RegistryOverrideManager registry_override_manager_; +}; + +// static +const base::char16 BeaconTest::kBeaconName[] = L"TestBeacon"; + +// Nothing in the regsitry, so the beacon should not exist. +TEST_P(BeaconTest, GetNonExistant) { + ASSERT_TRUE(beacon_.Get().is_null()); +} + +// Updating and then getting the beacon should return a value, and that it is +// within range. +TEST_P(BeaconTest, UpdateAndGet) { + base::Time before(base::Time::Now()); + beacon_.Update(); + base::Time after(base::Time::Now()); + base::Time beacon_time(beacon_.Get()); + ASSERT_FALSE(beacon_time.is_null()); + ASSERT_LE(before, beacon_time); + ASSERT_GE(after, beacon_time); +} + +// Tests that updating a first beacon only updates it the first time, but doing +// so for a last beacon always updates. +TEST_P(BeaconTest, UpdateTwice) { + beacon_.Update(); + base::Time beacon_time(beacon_.Get()); + + base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); + + beacon_.Update(); + if (beacon_type_ == BeaconType::FIRST) { + ASSERT_EQ(beacon_time, beacon_.Get()); + } else { + ASSERT_NE(beacon_time, beacon_.Get()); + } +} + +// Tests that the beacon is written into the proper location in the registry. +TEST_P(BeaconTest, Location) { + beacon_.Update(); + HKEY right_root = system_install_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; + HKEY wrong_root = system_install_ ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; + base::string16 right_key; + base::string16 wrong_key; + base::string16 value_name; + + if (beacon_scope_ == BeaconScope::PER_INSTALL || !system_install_) { + value_name = kBeaconName; + right_key = app_registration_data_.GetStateKey(); + wrong_key = app_registration_data_.GetStateMediumKey(); + } else { + ASSERT_TRUE(base::win::GetUserSidString(&value_name)); + right_key = + app_registration_data_.GetStateMediumKey() + L"\\" + kBeaconName; + wrong_key = app_registration_data_.GetStateKey(); + } + + // Keys should not exist in the wrong root or in the right root but wrong key. + ASSERT_FALSE(base::win::RegKey(wrong_root, right_key.c_str(), + KEY_READ).Valid()) << right_key; + ASSERT_FALSE(base::win::RegKey(wrong_root, wrong_key.c_str(), + KEY_READ).Valid()) << wrong_key; + ASSERT_FALSE(base::win::RegKey(right_root, wrong_key.c_str(), + KEY_READ).Valid()) << wrong_key; + // The right key should exist. + base::win::RegKey key(right_root, right_key.c_str(), KEY_READ); + ASSERT_TRUE(key.Valid()) << right_key; + // And should have the value. + ASSERT_TRUE(key.HasValue(value_name.c_str())) << value_name; +} + +// Run the tests for all combinations of beacon type, scope, and install level. +INSTANTIATE_TEST_CASE_P(BeaconTest, + BeaconTest, + Combine(Values(BeaconType::FIRST, BeaconType::LAST), + Values(BeaconScope::PER_USER, + BeaconScope::PER_INSTALL), + Bool())); + +enum class DistributionVariant { + SYSTEM_LEVEL, + USER_LEVEL, + SXS, +}; + +class DefaultBrowserBeaconTest + : public ::testing::TestWithParam { + protected: + using Super = ::testing::TestWithParam; + + DefaultBrowserBeaconTest() + : system_install_(GetParam() == DistributionVariant::SYSTEM_LEVEL), + chrome_sxs_(GetParam() == DistributionVariant::SXS), + chrome_exe_(GetChromePathForParams()), + distribution_(nullptr) {} + + void SetUp() override { + Super::SetUp(); + + // Override FILE_EXE so that various InstallUtil functions will consider + // this to be a user/system Chrome or Chrome SxS. + path_overrides_.push_back(new base::ScopedPathOverride( + base::FILE_EXE, chrome_exe_, true /* is_absolute */, + false /* !create */)); + + // Override these paths with their own values so that they can be found + // after the registry override manager is in place. Getting them would + // otherwise fail since the underlying calls to the OS need to see the real + // contents of the registry. + static const int kPathKeys[] = { + base::DIR_PROGRAM_FILES, + base::DIR_PROGRAM_FILESX86, + base::DIR_LOCAL_APP_DATA, + }; + for (int key : kPathKeys) { + base::FilePath temp; + PathService::Get(key, &temp); + path_overrides_.push_back(new base::ScopedPathOverride(key, temp)); + } + + // Override the registry so that tests can freely push state to it. + registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); + registry_override_manager_.OverrideRegistry(HKEY_LOCAL_MACHINE); + + distribution_ = BrowserDistribution::GetDistribution(); + } + + bool system_install_; + bool chrome_sxs_; + base::FilePath chrome_exe_; + BrowserDistribution* distribution_; + + private: + base::FilePath GetChromePathForParams() const { + base::FilePath chrome_exe; + int dir_key = base::DIR_LOCAL_APP_DATA; + + if (system_install_) { +#if defined(_WIN64) + static const int kSystemKey = base::DIR_PROGRAM_FILESX86; +#else + static const int kSystemKey = base::DIR_PROGRAM_FILES; +#endif + dir_key = kSystemKey; + } + PathService::Get(dir_key, &chrome_exe); +#if defined(GOOGLE_CHROME_BUILD) + chrome_exe = chrome_exe.Append(installer::kGoogleChromeInstallSubDir1); + if (chrome_sxs_) { + chrome_exe = chrome_exe.Append( + base::string16(installer::kGoogleChromeInstallSubDir2) + + installer::kSxSSuffix); + } else { + chrome_exe = chrome_exe.Append(installer::kGoogleChromeInstallSubDir2); + } +#else + chrome_exe = chrome_exe.AppendASCII("Chromium"); +#endif + chrome_exe = chrome_exe.Append(installer::kInstallBinaryDir); + return chrome_exe.Append(installer::kChromeExe); + } + + ScopedVector path_overrides_; + registry_util::RegistryOverrideManager registry_override_manager_; +}; + +// Tests that the default browser beacons work as expected. +TEST_P(DefaultBrowserBeaconTest, All) { + scoped_ptr last_was_default(MakeLastWasDefaultBeacon( + system_install_, distribution_->GetAppRegistrationData())); + scoped_ptr first_not_default(MakeFirstNotDefaultBeacon( + system_install_, distribution_->GetAppRegistrationData())); + + ASSERT_TRUE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // Chrome is not default. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_TRUE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); + + // Then it is. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::IS_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // It still is. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::IS_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_TRUE(first_not_default->Get().is_null()); + + // Now it's not again. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); + + // And it still isn't. + UpdateDefaultBrowserBeaconWithState(chrome_exe_, distribution_, + ShellUtil::NOT_DEFAULT); + ASSERT_FALSE(last_was_default->Get().is_null()); + ASSERT_FALSE(first_not_default->Get().is_null()); +} + +INSTANTIATE_TEST_CASE_P(SystemLevelChrome, + DefaultBrowserBeaconTest, + Values(DistributionVariant::SYSTEM_LEVEL)); +INSTANTIATE_TEST_CASE_P(UserLevelChrome, + DefaultBrowserBeaconTest, + Values(DistributionVariant::USER_LEVEL)); +#if 0 && defined(GOOGLE_CHROME_BUILD) +// Disabled for now since InstallUtil::IsChromeSxSProcess makes this impossible. +INSTANTIATE_TEST_CASE_P(ChromeSxS, DefaultBrowserBeaconTest, + Values(DistributionVariant::SXS)); +#endif + +} // namespace installer_util diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/BUILD.gn chromium-browser-43.0.2357.130/chrome/installer/util/BUILD.gn --- chromium-browser-43.0.2357.81/chrome/installer/util/BUILD.gn 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/BUILD.gn 2015-06-22 22:56:48.000000000 +0000 @@ -79,6 +79,8 @@ "app_registration_data.h", "auto_launch_util.cc", "auto_launch_util.h", + "beacons.cc", + "beacons.h", "browser_distribution.cc", "browser_distribution.h", "callback_work_item.cc", diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/shell_util.cc chromium-browser-43.0.2357.130/chrome/installer/util/shell_util.cc --- chromium-browser-43.0.2357.81/chrome/installer/util/shell_util.cc 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/shell_util.cc 2015-06-22 22:56:48.000000000 +0000 @@ -42,6 +42,7 @@ #include "base/win/windows_version.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" +#include "chrome/installer/util/beacons.h" #include "chrome/installer/util/browser_distribution.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/l10n_string_util.h" @@ -1933,9 +1934,10 @@ // flag. There is doubtless some other key we can hook into to cause "Repair" // to show up in Add/Remove programs for us. static const wchar_t* const kChromeProtocols[] = { L"http", L"https" }; - return ProbeProtocolHandlers(chrome_exe, - kChromeProtocols, - arraysize(kChromeProtocols)); + DefaultState default_state = ProbeProtocolHandlers( + chrome_exe, kChromeProtocols, arraysize(kChromeProtocols)); + UpdateDefaultBrowserBeaconWithState(chrome_exe, distribution, default_state); + return default_state; } ShellUtil::DefaultState ShellUtil::GetChromeDefaultProtocolClientState( diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/shell_util.h chromium-browser-43.0.2357.130/chrome/installer/util/shell_util.h --- chromium-browser-43.0.2357.81/chrome/installer/util/shell_util.h 2015-05-25 19:17:40.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/shell_util.h 2015-06-22 22:56:48.000000000 +0000 @@ -411,11 +411,12 @@ // Windows prior to Windows 8. static bool CanMakeChromeDefaultUnattended(); - // Returns the DefaultState of Chrome for HTTP and HTTPS. + // Returns the DefaultState of Chrome for HTTP and HTTPS and updates the + // default browser beacons as appropriate. static DefaultState GetChromeDefaultState(); - // Returns the DefaultState of the Chrome instance with the specified path - // for HTTP and HTTPs. + // Returns the DefaultState of the Chrome instance with the specified path for + // HTTP and HTTPs and updates the default browser beacons as appropriate. static DefaultState GetChromeDefaultStateFromPath( const base::FilePath& chrome_exe); diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/test_app_registration_data.cc chromium-browser-43.0.2357.130/chrome/installer/util/test_app_registration_data.cc --- chromium-browser-43.0.2357.81/chrome/installer/util/test_app_registration_data.cc 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/test_app_registration_data.cc 2015-06-16 19:01:18.000000000 +0000 @@ -0,0 +1,27 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/installer/util/test_app_registration_data.h" + +TestAppRegistrationData::TestAppRegistrationData() { +} + +TestAppRegistrationData::~TestAppRegistrationData() { +} + +base::string16 TestAppRegistrationData::GetAppGuid() const { + return L"test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetStateKey() const { + return L"Software\\Chromium\\ClientState\\test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetStateMediumKey() const { + return L"Software\\Chromium\\ClientStateMedium\\test_app_guid"; +} + +base::string16 TestAppRegistrationData::GetVersionKey() const { + return L"Software\\Chromium\\Clients\\test_app_guid"; +} diff -Nru chromium-browser-43.0.2357.81/chrome/installer/util/test_app_registration_data.h chromium-browser-43.0.2357.130/chrome/installer/util/test_app_registration_data.h --- chromium-browser-43.0.2357.81/chrome/installer/util/test_app_registration_data.h 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/installer/util/test_app_registration_data.h 2015-06-16 19:01:18.000000000 +0000 @@ -0,0 +1,20 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ +#define CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ + +#include "chrome/installer/util/app_registration_data.h" + +class TestAppRegistrationData : public AppRegistrationData { + public: + TestAppRegistrationData(); + ~TestAppRegistrationData() override; + base::string16 GetAppGuid() const override; + base::string16 GetStateKey() const override; + base::string16 GetStateMediumKey() const override; + base::string16 GetVersionKey() const override; +}; + +#endif // CHROME_INSTALLER_UTIL_TEST_APP_REGISTRATION_DATA_H_ diff -Nru chromium-browser-43.0.2357.81/chrome/VERSION chromium-browser-43.0.2357.130/chrome/VERSION --- chromium-browser-43.0.2357.81/chrome/VERSION 2015-05-25 19:17:38.000000000 +0000 +++ chromium-browser-43.0.2357.130/chrome/VERSION 2015-06-22 22:56:44.000000000 +0000 @@ -1,4 +1,4 @@ MAJOR=43 MINOR=0 BUILD=2357 -PATCH=81 +PATCH=130 diff -Nru chromium-browser-43.0.2357.81/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc chromium-browser-43.0.2357.130/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc --- chromium-browser-43.0.2357.81/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc 2015-05-25 19:00:26.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc 2015-06-16 19:01:20.000000000 +0000 @@ -97,7 +97,6 @@ WebGamepads* pads) { TRACE_EVENT0("GAMEPAD", "EnumerateDevices"); - pads->length = 0; // Mark all disconnected pads DISCONNECTED. for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) { if (!pads->items[i].connected) @@ -115,7 +114,6 @@ pad_state_[pad_index].status = XINPUT_CONNECTED; pad_state_[pad_index].xinput_index = i; pad_state_[pad_index].mapper = NULL; - pads->length++; } } @@ -151,7 +149,6 @@ else pad.mapping[0] = 0; - pads->length++; } } } @@ -177,6 +174,7 @@ if (devices_changed_hint) EnumerateDevices(pads); + pads->length = 0; for (size_t i = 0; i < WebGamepads::itemsLengthCap; ++i) { // We rely on device_changed and GetCapabilities to tell us that // something's been connected, but we will mark as disconnected if @@ -188,6 +186,9 @@ GetXInputPadData(i, &pads->items[i]); else if (pad_state_[i].status == RAWINPUT_CONNECTED) GetRawInputPadData(i, &pads->items[i]); + + if (pads->items[i].connected) + pads->length++; } } diff -Nru chromium-browser-43.0.2357.81/content/browser/plugin_service_impl.cc chromium-browser-43.0.2357.130/content/browser/plugin_service_impl.cc --- chromium-browser-43.0.2357.81/content/browser/plugin_service_impl.cc 2015-05-25 19:17:41.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/browser/plugin_service_impl.cc 2015-06-22 22:56:50.000000000 +0000 @@ -805,6 +805,11 @@ const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); npapi_plugins_enabled_ = command_line->HasSwitch(switches::kEnableNpapi); +#if defined(OS_WIN) + // NPAPI plugins don't play well with Win32k renderer lockdown. + if (npapi_plugins_enabled_) + DisableWin32kRendererLockdown(); +#endif NPAPIPluginStatus status = npapi_plugins_enabled_ ? NPAPI_STATUS_ENABLED : NPAPI_STATUS_DISABLED; #else diff -Nru chromium-browser-43.0.2357.81/content/browser/renderer_host/render_process_host_impl.cc chromium-browser-43.0.2357.130/content/browser/renderer_host/render_process_host_impl.cc --- chromium-browser-43.0.2357.81/content/browser/renderer_host/render_process_host_impl.cc 2015-05-25 19:17:41.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/browser/renderer_host/render_process_host_impl.cc 2015-06-22 22:56:50.000000000 +0000 @@ -1225,6 +1225,7 @@ switches::kDisableMojoChannel, switches::kDisableNotifications, switches::kDisableOverlayScrollbar, + switches::kDisablePermissionsAPI, switches::kDisablePinch, switches::kDisablePrefixedEncryptedMedia, switches::kDisableSeccompFilterSandbox, diff -Nru chromium-browser-43.0.2357.81/content/browser/service_worker/service_worker_url_request_job.cc chromium-browser-43.0.2357.130/content/browser/service_worker/service_worker_url_request_job.cc --- chromium-browser-43.0.2357.81/content/browser/service_worker/service_worker_url_request_job.cc 2015-05-25 19:17:41.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/browser/service_worker/service_worker_url_request_job.cc 2015-06-22 22:56:50.000000000 +0000 @@ -359,7 +359,10 @@ return; case FORWARD_TO_SERVICE_WORKER: - DCHECK(provider_host_ && provider_host_->active_version()); + if (!provider_host_ || !provider_host_->active_version()) { + DeliverErrorResponse(); + return; + } DCHECK(!fetch_dispatcher_); // Send a fetch event to the ServiceWorker associated to the // provider_host. diff -Nru chromium-browser-43.0.2357.81/content/browser/service_worker/service_worker_url_request_job_unittest.cc chromium-browser-43.0.2357.130/content/browser/service_worker/service_worker_url_request_job_unittest.cc --- chromium-browser-43.0.2357.81/content/browser/service_worker/service_worker_url_request_job_unittest.cc 2015-05-25 19:17:41.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/browser/service_worker/service_worker_url_request_job_unittest.cc 2015-06-22 22:56:50.000000000 +0000 @@ -260,7 +260,7 @@ DISALLOW_COPY_AND_ASSIGN(ProviderDeleteHelper); }; -TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHost) { +TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHostOnFetchEvent) { version_->SetStatus(ServiceWorkerVersion::ACTIVATED); // Shouldn't crash if the ProviderHost is deleted prior to completion of // the fetch event. @@ -270,6 +270,23 @@ TestRequest(200, "OK", std::string()); } +TEST_F(ServiceWorkerURLRequestJobTest, DeletedProviderHostBeforeFetchEvent) { + version_->SetStatus(ServiceWorkerVersion::ACTIVATED); + request_ = url_request_context_.CreateRequest( + GURL("http://example.com/foo.html"), net::DEFAULT_PRIORITY, + &url_request_delegate_); + + request_->set_method("GET"); + request_->Start(); + helper_->context()->RemoveProviderHost(kProcessID, kProviderID); + base::RunLoop().RunUntilIdle(); + EXPECT_TRUE(request_->status().is_success()); + EXPECT_EQ(500, request_->response_headers()->response_code()); + EXPECT_EQ("Service Worker Response Error", + request_->response_headers()->GetStatusText()); + EXPECT_EQ(std::string(), url_request_delegate_.response_data()); +} + // Responds to fetch events with a blob. class BlobResponder : public EmbeddedWorkerTestHelper { public: diff -Nru chromium-browser-43.0.2357.81/content/child/runtime_features.cc chromium-browser-43.0.2357.130/content/child/runtime_features.cc --- chromium-browser-43.0.2357.81/content/child/runtime_features.cc 2015-05-25 19:17:41.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/child/runtime_features.cc 2015-06-22 22:56:50.000000000 +0000 @@ -193,6 +193,9 @@ if (command_line.HasSwitch(switches::kEnablePushMessagingHasPermission)) WebRuntimeFeatures::enablePushMessagingHasPermission(true); + if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) + WebRuntimeFeatures::enablePermissionsAPI(false); + // Delete "StaleWhileRevalidate" line from chrome_browser_field_trials.cc // when this experiment is done. if (base::FieldTrialList::FindFullName("StaleWhileRevalidate") == "Enabled" || diff -Nru chromium-browser-43.0.2357.81/content/public/common/content_switches.cc chromium-browser-43.0.2357.130/content/public/common/content_switches.cc --- chromium-browser-43.0.2357.81/content/public/common/content_switches.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/public/common/content_switches.cc 2015-06-22 22:56:51.000000000 +0000 @@ -207,6 +207,9 @@ // Disable Pepper3D. const char kDisablePepper3d[] = "disable-pepper-3d"; +// Disables the Permissions API. +const char kDisablePermissionsAPI[] = "disable-permissions-api"; + // Disables compositor-accelerated touch-screen pinch gestures. const char kDisablePinch[] = "disable-pinch"; diff -Nru chromium-browser-43.0.2357.81/content/public/common/content_switches.h chromium-browser-43.0.2357.130/content/public/common/content_switches.h --- chromium-browser-43.0.2357.81/content/public/common/content_switches.h 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/public/common/content_switches.h 2015-06-22 22:56:51.000000000 +0000 @@ -72,6 +72,7 @@ CONTENT_EXPORT extern const char kDisableOneCopy[]; extern const char kDisablePepper3d[]; CONTENT_EXPORT extern const char kDisablePinch[]; +CONTENT_EXPORT extern const char kDisablePermissionsAPI[]; CONTENT_EXPORT extern const char kDisablePluginsDiscovery[]; CONTENT_EXPORT extern const char kDisableReadingFromCanvas[]; extern const char kDisableRemoteFonts[]; diff -Nru chromium-browser-43.0.2357.81/content/renderer/media/android/webmediaplayer_android.cc chromium-browser-43.0.2357.130/content/renderer/media/android/webmediaplayer_android.cc --- chromium-browser-43.0.2357.81/content/renderer/media/android/webmediaplayer_android.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/renderer/media/android/webmediaplayer_android.cc 2015-06-22 22:56:51.000000000 +0000 @@ -685,7 +685,7 @@ // flip_y==false means to keep the intrinsic orientation. web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, flip_y); web_graphics_context->copyTextureCHROMIUM(GL_TEXTURE_2D, src_texture, texture, - 0, internal_format, type); + internal_format, type); web_graphics_context->pixelStorei(GL_UNPACK_FLIP_Y_CHROMIUM, false); web_graphics_context->pixelStorei(GL_UNPACK_PREMULTIPLY_ALPHA_CHROMIUM, false); diff -Nru chromium-browser-43.0.2357.81/content/renderer/pepper/pepper_try_catch.cc chromium-browser-43.0.2357.130/content/renderer/pepper/pepper_try_catch.cc --- chromium-browser-43.0.2357.81/content/renderer/pepper/pepper_try_catch.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/renderer/pepper/pepper_try_catch.cc 2015-06-22 22:56:51.000000000 +0000 @@ -151,8 +151,13 @@ if (context_.IsEmpty()) { exception_message = "The v8 context has been destroyed."; } else if (try_catch_.HasCaught()) { - v8::String::Utf8Value utf8(try_catch_.Message()->Get()); - exception_message = std::string(*utf8, utf8.length()); + v8::Local message(try_catch_.Message()); + if (!message.IsEmpty()) { + v8::String::Utf8Value utf8(try_catch_.Message()->Get()); + exception_message = std::string(*utf8, utf8.length()); + } else { + exception_message = "There was a v8 exception."; + } } if (!exception_message.empty()) { diff -Nru chromium-browser-43.0.2357.81/content/test/gpu/gpu_tests/pixel_expectations.py chromium-browser-43.0.2357.130/content/test/gpu/gpu_tests/pixel_expectations.py --- chromium-browser-43.0.2357.81/content/test/gpu/gpu_tests/pixel_expectations.py 2015-05-25 19:00:27.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/test/gpu/gpu_tests/pixel_expectations.py 2015-06-22 22:56:51.000000000 +0000 @@ -11,4 +11,6 @@ # Sample Usage: # self.Fail('Pixel.Canvas2DRedBox', # ['mac', 'amd', ('nvidia', 0x1234)], bug=123) - pass + self.Fail('Pixel.Canvas2DRedBox', bug=485183) + self.Fail('Pixel.CSS3DBlueBox', bug=485183) + self.Fail('Pixel.WebGLGreenTriangle', bug=485183) diff -Nru chromium-browser-43.0.2357.81/content/test/gpu/page_sets/pixel_tests.py chromium-browser-43.0.2357.130/content/test/gpu/page_sets/pixel_tests.py --- chromium-browser-43.0.2357.81/content/test/gpu/page_sets/pixel_tests.py 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/content/test/gpu/page_sets/pixel_tests.py 2015-06-16 19:01:21.000000000 +0000 @@ -30,19 +30,19 @@ url='file://../../data/gpu/pixel_canvas2d.html', name=base_name + '.Canvas2DRedBox', test_rect=[0, 0, 300, 300], - revision=4, + revision=5, page_set=self)) self.AddUserStory(PixelTestsPage( url='file://../../data/gpu/pixel_css3d.html', name=base_name + '.CSS3DBlueBox', test_rect=[0, 0, 300, 300], - revision=12, + revision=13, page_set=self)) self.AddUserStory(PixelTestsPage( url='file://../../data/gpu/pixel_webgl.html', name=base_name + '.WebGLGreenTriangle', test_rect=[0, 0, 300, 300], - revision=9, + revision=10, page_set=self)) diff -Nru chromium-browser-43.0.2357.81/debian/apport/chromium-browser.py chromium-browser-43.0.2357.130/debian/apport/chromium-browser.py --- chromium-browser-43.0.2357.81/debian/apport/chromium-browser.py 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/apport/chromium-browser.py 2015-06-30 15:57:19.000000000 +0000 @@ -35,6 +35,7 @@ 'nspluginwrapper', # various plugins 'adobe-flash-player', + 'adobe-flashplugin', 'chromiumflashplugin', 'pepperflashplugin-nonfree', 'pepflashplugin-nonfree', diff -Nru chromium-browser-43.0.2357.81/debian/changelog chromium-browser-43.0.2357.130/debian/changelog --- chromium-browser-43.0.2357.81/debian/changelog 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/changelog 2015-06-30 15:57:19.000000000 +0000 @@ -1,34 +1,23 @@ -chromium-browser (43.0.2357.81-0ubuntu0.15.04.1.1170) vivid-security; urgency=medium +chromium-browser (43.0.2357.130-0ubuntu0.15.04.1.1174) vivid-security; urgency=medium - * Upstream release 43.0.2357.81. - - "Icons not displaying properly on Linux" (LP: #1449063) - * Upstream release 43.0.2357.65: - - CVE-2015-1252: Sandbox escape in Chrome. - - CVE-2015-1253: Cross-origin bypass in DOM. - - CVE-2015-1254: Cross-origin bypass in Editing. - - CVE-2015-1255: Use-after-free in WebAudio. - - CVE-2015-1256: Use-after-free in SVG. - - CVE-2015-1251: Use-after-free in Speech. - - CVE-2015-1257: Container-overflow in SVG. - - CVE-2015-1258: Negative-size parameter in Libvpx. - - CVE-2015-1259: Uninitialized value in PDFium. - - CVE-2015-1260: Use-after-free in WebRTC. - - CVE-2015-1261: URL bar spoofing. - - CVE-2015-1262: Uninitialized value in Blink. - - CVE-2015-1263: Insecure download of spellcheck dictionary. - - CVE-2015-1264: Cross-site scripting in bookmarks. - - CVE-2015-1265: Various fixes from internal audits, fuzzing and other - initiatives. - - Multiple vulnerabilities in V8 fixed at the tip of the 4.3 branch - (currently 4.3.61.21). - * debian/patches/display-scaling-report-hardware-info: removed, unnecessary. - * debian/patches/coordinate-space-map: removed, unnecessary. - * debian/patches/enable_vaapi_on_linux.diff: Temporarily disable patch until - ARM works. - * debian/chromium-browser.sh.in: Add --verbose to get logging info. - * debian/patches/{notifications-nicer,mir-support}: disable unnecessary - patches. - * debian/control, debian/chromium-browser.sh.in: Prompt nothing about - Flash plugin. Send Help clicks to Wiki instead. + [Chad Miller] + * Upstream release 43.0.2357.130: + - CVE-2015-1266: Scheme validation error in WebUI. + - CVE-2015-1268: Cross-origin bypass in Blink. + - CVE-2015-1267: Cross-origin bypass in Blink. + - CVE-2015-1269: Normalization error in HSTS/HPKP preload list. + * debian/tests/smoketest-actual: Capture web-server log so we can + get port and test retreival. Fixes autopkgtest failures. + * debian/patches/widevine-other-locations: Search Chrome install + location to find widevine plugins. + * Use new Flash plugin name in apport collector. + * debian/patches/gpu_default_disabled: Make GPU activation a (default off) + preference instead of blacklisting. + [Iain Lane] + * Test fixes. + * debian/tests/control: Add a test-dep on python3-httplib2 and dbus-x11 + which are required by the testsuite. + * debian/tests/smoketest-actual: Redirect webserver-out and webserver-err so + that the test can read these. - -- Chad MILLER Mon, 01 Jun 2015 15:29:04 -0400 + -- Chad MILLER Mon, 29 Jun 2015 15:54:16 -0400 diff -Nru chromium-browser-43.0.2357.81/debian/patches/all_gpus_blacklisted chromium-browser-43.0.2357.130/debian/patches/all_gpus_blacklisted --- chromium-browser-43.0.2357.81/debian/patches/all_gpus_blacklisted 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/patches/all_gpus_blacklisted 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ ---- a/content/browser/gpu/gpu_data_manager_impl_private.cc -+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -915,7 +915,7 @@ GpuDataManagerImplPrivate::GpuDataManage - observer_list_(new GpuDataManagerObserverList), - use_swiftshader_(false), - use_warp_(false), -- card_blacklisted_(false), -+ card_blacklisted_(true), - update_histograms_(true), - window_count_(0), - domain_blocking_enabled_(true), diff -Nru chromium-browser-43.0.2357.81/debian/patches/gpu_default_disabled chromium-browser-43.0.2357.130/debian/patches/gpu_default_disabled --- chromium-browser-43.0.2357.81/debian/patches/gpu_default_disabled 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/patches/gpu_default_disabled 2015-06-30 15:57:19.000000000 +0000 @@ -0,0 +1,19 @@ +--- a/chrome/browser/gpu/gpu_mode_manager.cc ++++ b/chrome/browser/gpu/gpu_mode_manager.cc +@@ -34,13 +34,13 @@ void SetPreviousGpuModePref(bool enabled + // static + void GpuModeManager::RegisterPrefs(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref( +- prefs::kHardwareAccelerationModeEnabled, true); ++ prefs::kHardwareAccelerationModeEnabled, false); + registry->RegisterBooleanPref( +- prefs::kHardwareAccelerationModePrevious, true); ++ prefs::kHardwareAccelerationModePrevious, false); + } + + GpuModeManager::GpuModeManager() +- : initial_gpu_mode_pref_(true) { ++ : initial_gpu_mode_pref_(false) { + if (g_browser_process->local_state()) { // Skip for unit tests + pref_registrar_.Init(g_browser_process->local_state()); + // Do nothing when the pref changes. It takes effect after diff -Nru chromium-browser-43.0.2357.81/debian/patches/series chromium-browser-43.0.2357.130/debian/patches/series --- chromium-browser-43.0.2357.81/debian/patches/series 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/patches/series 2015-06-30 15:57:19.000000000 +0000 @@ -20,6 +20,7 @@ lp-translations-paths #mir-support gpu-hangs -all_gpus_blacklisted +gpu_default_disabled #enable_vaapi_on_linux.diff fix_building_widevinecdm_with_chromium.patch +widevine-other-locations diff -Nru chromium-browser-43.0.2357.81/debian/patches/widevine-other-locations chromium-browser-43.0.2357.130/debian/patches/widevine-other-locations --- chromium-browser-43.0.2357.81/debian/patches/widevine-other-locations 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/patches/widevine-other-locations 2015-06-30 15:57:19.000000000 +0000 @@ -0,0 +1,24 @@ +--- a/chrome/common/chrome_paths.cc ++++ b/chrome/common/chrome_paths.cc +@@ -392,6 +392,10 @@ bool PathProvider(int key, base::FilePat + #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) + #if defined(WIDEVINE_CDM_IS_COMPONENT) + case chrome::DIR_COMPONENT_WIDEVINE_CDM: ++ if (base::PathExists("/opt/google/chrome/libwidevinecdm.so")) { ++ cur = cur.Append("/opt/google/chrome/"); ++ break; ++ } + if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) + return false; + cur = cur.Append(kWidevineCdmBaseDirectory); +@@ -401,6 +405,10 @@ bool PathProvider(int key, base::FilePat + // In the component case, this is the source adapter. Otherwise, it is the + // actual Pepper module that gets loaded. + case chrome::FILE_WIDEVINE_CDM_ADAPTER: ++ if (base::PathExists("/opt/google/chrome/libwidevinecdmadapter.so")) { ++ cur = cur.AppendASCII("/opt/google/chrome/libwidevinecdmadapter.so"); ++ break; ++ } + if (!GetInternalPluginsDirectory(&cur)) + return false; + cur = cur.AppendASCII(kWidevineCdmAdapterFileName); diff -Nru chromium-browser-43.0.2357.81/debian/rules chromium-browser-43.0.2357.130/debian/rules --- chromium-browser-43.0.2357.81/debian/rules 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/rules 2015-06-30 15:57:19.000000000 +0000 @@ -89,7 +89,7 @@ GYP_DEFINES += enable_touch_ui=1 # add support and stubbed implementation of widevine (needed for EME) -GYP_DEFINES += enable_widevine=1 +GYP_DEFINES += enable_widevine=1 enable_pepper_cdms=1 # Prefer gcc/g++ over clang until clang is better tested in Ubuntu. GYP_DEFINES += clang=0 @@ -627,3 +627,5 @@ # This changes state for ALL rules in the makefile. .ONESHELL: + +.DEFAULT: build-stamp build-stamp-ffmpeg-extra diff -Nru chromium-browser-43.0.2357.81/debian/source/include-binaries chromium-browser-43.0.2357.130/debian/source/include-binaries --- chromium-browser-43.0.2357.81/debian/source/include-binaries 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/source/include-binaries 2015-06-30 15:57:19.000000000 +0000 @@ -9,5 +9,5 @@ debian/tests/testdata/2-bothwebappsandnormal-webapps-startup-doesnt-pollute-normal-functions.sikuli/NewTab.png debian/tests/testdata/6-webapps-window-no-chrome.sikuli/Directorylis-1.png debian/tests/testdata/9-search-credit.sikuli/google-text.png +debian/tests/testdata/9-search-credit.sikuli/query-start.png debian/tests/testdata/9-search-credit.sikuli/cr-refresh-button.png - diff -Nru chromium-browser-43.0.2357.81/debian/tests/control chromium-browser-43.0.2357.130/debian/tests/control --- chromium-browser-43.0.2357.81/debian/tests/control 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/tests/control 2015-06-30 15:57:19.000000000 +0000 @@ -1,3 +1,4 @@ Tests: smoketest -Depends: xvfb, bash, python3-minimal, unity-chromium-extension, - libsikuli-script-java, metacity, x11-apps +Depends: xvfb, bash, python3-minimal, unity-chromium-extension, + libsikuli-script-java, metacity, x11-apps, python3-httplib2, + dbus-x11 diff -Nru chromium-browser-43.0.2357.81/debian/tests/smoketest-actual chromium-browser-43.0.2357.130/debian/tests/smoketest-actual --- chromium-browser-43.0.2357.81/debian/tests/smoketest-actual 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/tests/smoketest-actual 2015-06-30 15:57:19.000000000 +0000 @@ -43,7 +43,7 @@ done test "$retry" -lt ${retrylimit} -mkdir profile_storage +mkdir -p profile_storage # Now everything is set up for a series of tests. @@ -109,7 +109,7 @@ echo -n "Test $(basename ${testname}): " sikuli $sikulitest &>${testname}-log - if fgrep -q "[error]" ${testname}-log; then + if egrep -i "(exception|error)" ${testname}-log; then failures="$(basename $testname) $failures" echo "BAD" cat -n ${testname}-log diff -Nru chromium-browser-43.0.2357.81/debian/tests/testdata/9-search-credit.sikuli/9-search-credit.py chromium-browser-43.0.2357.130/debian/tests/testdata/9-search-credit.sikuli/9-search-credit.py --- chromium-browser-43.0.2357.81/debian/tests/testdata/9-search-credit.sikuli/9-search-credit.py 2015-06-02 13:29:36.000000000 +0000 +++ chromium-browser-43.0.2357.130/debian/tests/testdata/9-search-credit.sikuli/9-search-credit.py 2015-06-30 15:57:19.000000000 +0000 @@ -16,10 +16,12 @@ # first assertion: default search is Google wait("google-text.png", 10) + #wait("query-start.png", 10) + # second assertion: search url contains our token just_below_refresh_button.type("l", KeyModifier.CTRL) - just_below_refresh_button.type("x", KeyModifier.CTRL) + just_below_refresh_button.type("c", KeyModifier.CTRL) location_bar_contents = Env.getClipboard() assert test_value in location_bar_contents, "Hrm, logic is wrong. " + location_bar_contents @@ -28,11 +30,13 @@ except: if app.pid: - os.kill(app.pid, signal.SIGTERM) - app.wait() + #os.kill(app.pid, signal.SIGTERM) + #app.wait() + pass else: # Jython python2.5 hackey. So so sorry. - app._process.destroy() + #app._process.destroy() + pass raise print "Success!" Binary files /tmp/yhvOFVKOIr/chromium-browser-43.0.2357.81/debian/tests/testdata/9-search-credit.sikuli/query-start.png and /tmp/wLkdctsczn/chromium-browser-43.0.2357.130/debian/tests/testdata/9-search-credit.sikuli/query-start.png differ diff -Nru chromium-browser-43.0.2357.81/DEPS chromium-browser-43.0.2357.130/DEPS --- chromium-browser-43.0.2357.81/DEPS 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/DEPS 2015-06-22 22:56:43.000000000 +0000 @@ -1,379 +1,323 @@ vars = { - 'angleproject': - 'http://angleproject.googlecode.com/svn', - 'bidichecker': - 'http://bidichecker.googlecode.com/svn', - 'blink': - 'http://src.chromium.org/blink', + 'angle_revision': + '99f075dade7cfb0b56e80a065de3218745e4c177', + 'boringssl_git': + 'https://boringssl.googlesource.com', + 'boringssl_revision': + '40acdaeb86c516b68e3442f3a008e8d21e514bda', 'buildspec_platforms': 'all', - 'cld2': - 'https://cld2.googlecode.com/svn', - 'eyes-free': - 'http://eyes-free.googlecode.com/svn', - 'git.chromium.org': + 'buildtools_revision': + '3b302fef93f7cc58d9b8168466905237484b2772', + 'chromium_git': 'https://chromium.googlesource.com', - 'google-breakpad': - 'http://google-breakpad.googlecode.com/svn', - 'google-cache-invalidation-api': - 'http://google-cache-invalidation-api.googlecode.com/svn', - 'google-safe-browsing': - 'http://google-safe-browsing.googlecode.com/svn', - 'google-toolbox-for-mac': - 'http://google-toolbox-for-mac.googlecode.com/svn', - 'google-url': - 'http://google-url.googlecode.com/svn', - 'googlemock': - 'http://googlemock.googlecode.com/svn', - 'googletest': - 'http://googletest.googlecode.com/svn', - 'grit-i18n': - 'http://grit-i18n.googlecode.com/svn', - 'gyp': - 'http://gyp.googlecode.com/svn', - 'jsoncpp': - 'http://svn.code.sf.net/p/jsoncpp/code', - 'jsr-305': - 'http://jsr-305.googlecode.com/svn', - 'leveldb': - 'http://leveldb.googlecode.com/svn', - 'libaddressinput': - 'http://libaddressinput.googlecode.com/svn', - 'libjingle': - 'http://libjingle.googlecode.com/svn', - 'libphonenumber': - 'http://libphonenumber.googlecode.com/svn', - 'libyuv': - 'http://libyuv.googlecode.com/svn', - 'linux-syscall-support': - 'http://linux-syscall-support.googlecode.com/svn', - 'mozc': - 'http://mozc.googlecode.com/svn', - 'native_client': - 'http://src.chromium.org/native_client', - 'octane-benchmark': - 'http://octane-benchmark.googlecode.com/svn', - 'open-vcdiff': - 'http://open-vcdiff.googlecode.com/svn', - 'ots': - 'http://ots.googlecode.com/svn', - 'pdfsqueeze': - 'http://pdfsqueeze.googlecode.com/svn', - 'pefile': - 'http://pefile.googlecode.com/svn', - 'ppapi': - 'http://ppapi.googlecode.com/svn', - 'protobuf': - 'http://protobuf.googlecode.com/svn', - 'pyftpdlib': - 'http://pyftpdlib.googlecode.com/svn', - 'pymox': - 'http://pymox.googlecode.com/svn', - 'pywebsocket': - 'http://pywebsocket.googlecode.com/svn', - 'rlz': - 'http://rlz.googlecode.com/svn', - 'sawbuck': - 'http://sawbuck.googlecode.com/svn', - 'sctp-refimpl': - 'https://sctp-refimpl.googlecode.com/svn', - 'seccompsandbox': - 'http://seccompsandbox.googlecode.com/svn', - 'selenium': - 'http://selenium.googlecode.com/svn', - 'sfntly': - 'http://sfntly.googlecode.com/svn', - 'skia': - 'http://skia.googlecode.com/svn', - 'smhasher': - 'http://smhasher.googlecode.com/svn', - 'snappy': - 'http://snappy.googlecode.com/svn', - 'trace-viewer': - 'http://trace-viewer.googlecode.com/svn', - 'v8': - 'http://v8.googlecode.com/svn', - 'v8-i18n': - 'http://v8-i18n.googlecode.com/svn', - 'web-page-replay': - 'http://web-page-replay.googlecode.com/svn', + 'chromiumos_git': + 'https://chromium.googlesource.com/chromiumos', + 'google_toolbox_for_mac_revision': + '17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + 'googlecode_url': + 'http://%s.googlecode.com/svn', + 'libvpx_revision': + '861f35b01c87a021540aace739cb7415c08e987b', + 'lighttpd_revision': + '9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + 'llvm_git': + 'https://llvm.googlesource.com', + 'llvm_url': + 'http://src.chromium.org/llvm-project', + 'lss_revision': + 'e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + 'nacl_revision': + 'bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', + 'nss_revision': + 'bb4e75a43d007518ae7d618665ea2f25b0c60b63', + 'openmax_dl_revision': + '0b238cb62c32b6f45680cf577eddb1b051ae0219', + 'pdfium_git': + 'https://pdfium.googlesource.com', + 'pdfium_revision': + 'e3dd159edee8cf2eec3f30f77ef6830597c1bc2f', + 'sfntly_revision': + '1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + 'skia_git': + 'https://skia.googlesource.com', + 'skia_revision': + 'aa4c7a704289b7adcbfbd23580667a1950a9ca6e', + 'sourceforge_url': + 'http://svn.code.sf.net/p/%(repo)s/code', + 'swarming_revision': + '13e7c88b5a9494467259603486f001694ea85721', + 'v8_branch': + 'trunk', + 'v8_revision': + 'f5c0a23a505616796a628d64f4ffe377d1fc4bcf', + 'webkit_revision': + '54ac8d7272b177ae0d94ca8de98bd236c7b8dbea', 'webkit_trunk': - 'http://src.chromium.org/blink/trunk', - 'webrtc': - 'http://webrtc.googlecode.com/svn' + 'http://src.chromium.org/blink/trunk' } +allowed_hosts = [ + 'android.googlesource.com', + 'boringssl.googlesource.com', + 'chromium.googlesource.com', + 'pdfium.googlesource.com' +] + deps = { - 'build': - '/trunk/tools/build@294688', - 'build/scripts/command_wrapper/bin': - '/trunk/tools/command_wrapper/bin@135178', - 'build/scripts/gsd_generate_index': - '/trunk/tools/gsd_generate_index@164784', - 'build/scripts/private/data/reliability': - '/trunk/src/chrome/test/data/reliability@291312', - 'build/scripts/tools/deps2git': - '/trunk/tools/deps2git@292856', - 'build/third_party/lighttpd': - '/trunk/deps/third_party/lighttpd@58968', - 'depot_tools': - '/trunk/tools/depot_tools@294679', 'src/breakpad/src': - (Var("git.chromium.org")) + '/external/google-breakpad/src.git@39f710989688f8e1a1c7e7f7c1ecd827f2b1a1f4', + (Var("chromium_git")) + '/external/google-breakpad/src.git@39f710989688f8e1a1c7e7f7c1ecd827f2b1a1f4', 'src/buildtools': - (Var("git.chromium.org")) + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', + (Var("chromium_git")) + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', 'src/chrome/test/data/perf/canvas_bench': - (Var("git.chromium.org")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', + (Var("chromium_git")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', 'src/chrome/test/data/perf/frame_rate/content': - (Var("git.chromium.org")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', + (Var("chromium_git")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', 'src/media/cdm/ppapi/api': - (Var("git.chromium.org")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', + (Var("chromium_git")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', 'src/native_client': - (Var("git.chromium.org")) + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', + (Var("chromium_git")) + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', 'src/sdch/open-vcdiff': - (Var("git.chromium.org")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', + (Var("chromium_git")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', 'src/testing/gmock': - (Var("git.chromium.org")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', + (Var("chromium_git")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', 'src/testing/gtest': - (Var("git.chromium.org")) + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', + (Var("chromium_git")) + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', 'src/third_party/WebKit': - (Var("git.chromium.org")) + '/chromium/blink.git@df1831922f8898d4617b7469f0a0da3f4f09f1ad', + (Var("chromium_git")) + '/chromium/blink.git@c7e580c606277e12855abfd3dfb0e10eb7e715ca', 'src/third_party/angle': - (Var("git.chromium.org")) + '/angle/angle.git@99f075dade7cfb0b56e80a065de3218745e4c177', + (Var("chromium_git")) + '/angle/angle.git@99f075dade7cfb0b56e80a065de3218745e4c177', 'src/third_party/bidichecker': - (Var("git.chromium.org")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', + (Var("chromium_git")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', + (Var("boringssl_git")) + '/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', 'src/third_party/cacheinvalidation/src': - (Var("git.chromium.org")) + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', + (Var("chromium_git")) + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', 'src/third_party/cld_2/src': - (Var("git.chromium.org")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', + (Var("chromium_git")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', 'src/third_party/colorama/src': - (Var("git.chromium.org")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', + (Var("chromium_git")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'src/third_party/crashpad/crashpad': - (Var("git.chromium.org")) + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', + (Var("chromium_git")) + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', 'src/third_party/dom_distiller_js/dist': - (Var("git.chromium.org")) + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', + (Var("chromium_git")) + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', 'src/third_party/ffmpeg': - (Var("git.chromium.org")) + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', + (Var("chromium_git")) + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', 'src/third_party/flac': - (Var("git.chromium.org")) + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', + (Var("chromium_git")) + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', 'src/third_party/hunspell': - (Var("git.chromium.org")) + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', + (Var("chromium_git")) + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', 'src/third_party/hunspell_dictionaries': - (Var("git.chromium.org")) + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', + (Var("chromium_git")) + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', 'src/third_party/icu': - (Var("git.chromium.org")) + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', + (Var("chromium_git")) + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', 'src/third_party/jsoncpp/source/include': - (Var("git.chromium.org")) + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', + (Var("chromium_git")) + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', 'src/third_party/jsoncpp/source/src/lib_json': - (Var("git.chromium.org")) + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', + (Var("chromium_git")) + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', 'src/third_party/leveldatabase/src': - (Var("git.chromium.org")) + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', + (Var("chromium_git")) + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', 'src/third_party/libaddressinput/src': - (Var("git.chromium.org")) + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', + (Var("chromium_git")) + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', 'src/third_party/libexif/sources': - (Var("git.chromium.org")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', + (Var("chromium_git")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', 'src/third_party/libjingle/source/talk': - (Var("git.chromium.org")) + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', + (Var("chromium_git")) + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', 'src/third_party/libjpeg_turbo': - (Var("git.chromium.org")) + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', + (Var("chromium_git")) + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', 'src/third_party/libphonenumber/src/phonenumbers': - (Var("git.chromium.org")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', + (Var("chromium_git")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', 'src/third_party/libphonenumber/src/resources': - (Var("git.chromium.org")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', + (Var("chromium_git")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', 'src/third_party/libphonenumber/src/test': - (Var("git.chromium.org")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', + (Var("chromium_git")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', 'src/third_party/libsrtp': - (Var("git.chromium.org")) + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', + (Var("chromium_git")) + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', 'src/third_party/libvpx': - (Var("git.chromium.org")) + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', + (Var("chromium_git")) + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', 'src/third_party/libyuv': - (Var("git.chromium.org")) + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', + (Var("chromium_git")) + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', 'src/third_party/mesa/src': - (Var("git.chromium.org")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', + (Var("chromium_git")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', 'src/third_party/openmax_dl': - (Var("git.chromium.org")) + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', + (Var("chromium_git")) + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', 'src/third_party/opus/src': - (Var("git.chromium.org")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', + (Var("chromium_git")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', 'src/third_party/pdfium': - 'https://pdfium.googlesource.com/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', + (Var("pdfium_git")) + '/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', 'src/third_party/py_trace_event/src': - (Var("git.chromium.org")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', + (Var("chromium_git")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', 'src/third_party/pyftpdlib/src': - (Var("git.chromium.org")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', + (Var("chromium_git")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', 'src/third_party/pywebsocket/src': - (Var("git.chromium.org")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', + (Var("chromium_git")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', 'src/third_party/safe_browsing/testing': - (Var("git.chromium.org")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', + (Var("chromium_git")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', 'src/third_party/scons-2.0.1': - (Var("git.chromium.org")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', + (Var("chromium_git")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', 'src/third_party/sfntly/cpp/src': - (Var("git.chromium.org")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + (Var("chromium_git")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', 'src/third_party/skia': - (Var("git.chromium.org")) + '/skia.git@969098603fc16538a5f5acd3f9c1cf0269faa039', + (Var("chromium_git")) + '/skia.git@7be37a9beb17711b8f297fc47a4ae473d9b3c018', 'src/third_party/smhasher/src': - (Var("git.chromium.org")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', + (Var("chromium_git")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', 'src/third_party/snappy/src': - (Var("git.chromium.org")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', + (Var("chromium_git")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', 'src/third_party/swig/Lib': - (Var("git.chromium.org")) + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', + (Var("chromium_git")) + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', 'src/third_party/trace-viewer': - (Var("git.chromium.org")) + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', + (Var("chromium_git")) + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', 'src/third_party/usrsctp/usrsctplib': - (Var("git.chromium.org")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', + (Var("chromium_git")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', 'src/third_party/webdriver/pylib': - (Var("git.chromium.org")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', + (Var("chromium_git")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', 'src/third_party/webgl/src': - (Var("git.chromium.org")) + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', + (Var("chromium_git")) + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', 'src/third_party/webpagereplay': - (Var("git.chromium.org")) + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', + (Var("chromium_git")) + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', 'src/third_party/webrtc': - (Var("git.chromium.org")) + '/external/webrtc/trunk/webrtc.git@0528a0544e300cfce85fe14c22f7fc22dee0e116', + (Var("chromium_git")) + '/external/webrtc/trunk/webrtc.git@0528a0544e300cfce85fe14c22f7fc22dee0e116', 'src/third_party/yasm/source/patched-yasm': - (Var("git.chromium.org")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', + (Var("chromium_git")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', 'src/tools/deps2git': - (Var("git.chromium.org")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', + (Var("chromium_git")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', 'src/tools/grit': - (Var("git.chromium.org")) + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', + (Var("chromium_git")) + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', 'src/tools/gyp': - (Var("git.chromium.org")) + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', + (Var("chromium_git")) + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', 'src/tools/page_cycler/acid3': - (Var("git.chromium.org")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', + (Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', 'src/tools/swarming_client': - (Var("git.chromium.org")) + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', + (Var("chromium_git")) + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', 'src/v8': - (Var("git.chromium.org")) + '/v8/v8.git@54a314f7624b4e0a71968b8d62b0d69f6027fc20' + (Var("chromium_git")) + '/v8/v8.git@4c09ecee43d4464c6ecf6ffc0a28ead56f91937c' } deps_os = { 'android': { - 'src/pdf': None, 'src/third_party/android_protobuf/src': - (Var("git.chromium.org")) + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', + (Var("chromium_git")) + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', 'src/third_party/android_tools': - (Var("git.chromium.org")) + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', + (Var("chromium_git")) + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', 'src/third_party/apache-mime4j': - (Var("git.chromium.org")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', + (Var("chromium_git")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', 'src/third_party/appurify-python/src': - (Var("git.chromium.org")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', + (Var("chromium_git")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', 'src/third_party/elfutils/src': - (Var("git.chromium.org")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', + (Var("chromium_git")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', 'src/third_party/findbugs': - (Var("git.chromium.org")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', + (Var("chromium_git")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', 'src/third_party/freetype': - (Var("git.chromium.org")) + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', + (Var("chromium_git")) + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', 'src/third_party/httpcomponents-client': - (Var("git.chromium.org")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', + (Var("chromium_git")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', 'src/third_party/httpcomponents-core': - (Var("git.chromium.org")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', + (Var("chromium_git")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', 'src/third_party/jarjar': - (Var("git.chromium.org")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', + (Var("chromium_git")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', 'src/third_party/jsr-305/src': - (Var("git.chromium.org")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', + (Var("chromium_git")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', 'src/third_party/junit/src': - (Var("git.chromium.org")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', + (Var("chromium_git")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', 'src/third_party/lss': - (Var("git.chromium.org")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', 'src/third_party/mockito/src': - (Var("git.chromium.org")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', + (Var("chromium_git")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', 'src/third_party/requests/src': - (Var("git.chromium.org")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', + (Var("chromium_git")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', 'src/third_party/robolectric/lib': - (Var("git.chromium.org")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810' + (Var("chromium_git")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810' }, 'ios': { 'src/chrome/test/data/perf/canvas_bench': None, 'src/chrome/test/data/perf/frame_rate/content': None, 'src/ios/third_party/gcdwebserver/src': - (Var("git.chromium.org")) + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', + (Var("chromium_git")) + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', 'src/native_client': None, 'src/testing/iossim/third_party/class-dump': - (Var("git.chromium.org")) + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', + (Var("chromium_git")) + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', 'src/third_party/ffmpeg': None, 'src/third_party/google_toolbox_for_mac/src': - (Var("git.chromium.org")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', 'src/third_party/hunspell': None, 'src/third_party/hunspell_dictionaries': None, 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', + (Var("chromium_git")) + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', 'src/third_party/webgl': None }, 'mac': { 'src/chrome/installer/mac/third_party/xz/xz': - (Var("git.chromium.org")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', + (Var("chromium_git")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', 'src/chrome/tools/test/reference_build/chrome_mac': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', 'src/third_party/google_toolbox_for_mac/src': - (Var("git.chromium.org")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', 'src/third_party/lighttpd': - (Var("git.chromium.org")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', + (Var("chromium_git")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', 'src/third_party/pdfsqueeze': - (Var("git.chromium.org")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', + (Var("chromium_git")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', 'src/third_party/swig/mac': - (Var("git.chromium.org")) + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e' + (Var("chromium_git")) + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e' }, 'unix': { - 'build/third_party/xvfb': - '/trunk/tools/third_party/xvfb@125214', 'src/chrome/tools/test/reference_build/chrome_linux': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', 'src/third_party/chromite': - (Var("git.chromium.org")) + '/chromiumos/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', + (Var("chromiumos_git")) + '/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', 'src/third_party/cros_system_api': - (Var("git.chromium.org")) + '/chromiumos/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', + (Var("chromiumos_git")) + '/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', 'src/third_party/fontconfig/src': - (Var("git.chromium.org")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', + (Var("chromium_git")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', 'src/third_party/freetype2/src': - (Var("git.chromium.org")) + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', + (Var("chromium_git")) + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', 'src/third_party/liblouis/src': - (Var("git.chromium.org")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', + (Var("chromium_git")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', 'src/third_party/lss': - (Var("git.chromium.org")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', 'src/third_party/pyelftools': - (Var("git.chromium.org")) + '/chromiumos/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', + (Var("chromiumos_git")) + '/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', 'src/third_party/stp/src': - (Var("git.chromium.org")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', + (Var("chromium_git")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', 'src/third_party/swig/linux': - (Var("git.chromium.org")) + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', + (Var("chromium_git")) + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', 'src/third_party/undoview': - (Var("git.chromium.org")) + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', + (Var("chromium_git")) + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', 'src/third_party/xdg-utils': - (Var("git.chromium.org")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d' + (Var("chromium_git")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d' }, 'win': { 'src/chrome/tools/test/reference_build/chrome_win': - (Var("git.chromium.org")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', + (Var("chromium_git")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', 'src/third_party/bison': - (Var("git.chromium.org")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', + (Var("chromium_git")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', 'src/third_party/cygwin': - (Var("git.chromium.org")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', + (Var("chromium_git")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', 'src/third_party/gnu_binutils': - (Var("git.chromium.org")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', + (Var("chromium_git")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', 'src/third_party/gperf': - (Var("git.chromium.org")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', + (Var("chromium_git")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', 'src/third_party/lighttpd': - (Var("git.chromium.org")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', 'src/third_party/mingw-w64/mingw/bin': - (Var("git.chromium.org")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', + (Var("chromium_git")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', 'src/third_party/nacl_sdk_binaries': - (Var("git.chromium.org")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', + (Var("chromium_git")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', 'src/third_party/nss': - (Var("git.chromium.org")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', + (Var("chromium_git")) + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', 'src/third_party/omaha/src/omaha': - (Var("git.chromium.org")) + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', + (Var("chromium_git")) + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', 'src/third_party/pefile': - (Var("git.chromium.org")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', + (Var("chromium_git")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', 'src/third_party/perl': - (Var("git.chromium.org")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', + (Var("chromium_git")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', 'src/third_party/psyco_win32': - (Var("git.chromium.org")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', + (Var("chromium_git")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', 'src/third_party/swig/win': - (Var("git.chromium.org")) + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', + (Var("chromium_git")) + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', 'src/third_party/yasm/binaries': - (Var("git.chromium.org")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881' + (Var("chromium_git")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881' } } @@ -723,17 +667,6 @@ 'src/tools/.*\\.py', 'name': 'remove_stale_pyc_files' - }, - { - 'action': [ - 'python', - 'build/scripts/tools/runit.py', - 'python', - 'build/scripts/common/cros_chromite.py', - '-v' - ], - 'pattern': - '.*/cros_chromite\\.py' } ] diff -Nru chromium-browser-43.0.2357.81/.DEPS.git chromium-browser-43.0.2357.130/.DEPS.git --- chromium-browser-43.0.2357.81/.DEPS.git 2015-05-25 19:17:37.000000000 +0000 +++ chromium-browser-43.0.2357.130/.DEPS.git 1970-01-01 00:00:00.000000000 +0000 @@ -1,813 +0,0 @@ -# DO NOT EDIT EXCEPT FOR LOCAL TESTING. -# THIS IS A GENERATED FILE. -# ALL MANUAL CHANGES WILL BE OVERWRITTEN. -# SEE http://code.google.com/p/chromium/wiki/UsingGit -# FOR HOW TO ROLL DEPS -vars = { - 'eyes-free': - 'http://eyes-free.googlecode.com/svn', - 'webkit_rev': - '@df1831922f8898d4617b7469f0a0da3f4f09f1ad', - 'blink': - 'http://src.chromium.org/blink', - 'skia': - 'http://skia.googlecode.com/svn', - 'google-breakpad': - 'http://google-breakpad.googlecode.com/svn', - 'sawbuck': - 'http://sawbuck.googlecode.com/svn', - 'mozc': - 'http://mozc.googlecode.com/svn', - 'git.chromium.org': - 'https://chromium.googlesource.com', - 'v8-i18n': - 'http://v8-i18n.googlecode.com/svn', - 'selenium': - 'http://selenium.googlecode.com/svn', - 'buildspec_platforms': - 'all', - 'webkit_url': - 'https://chromium.googlesource.com/chromium/blink.git', - 'snappy': - 'http://snappy.googlecode.com/svn', - 'ppapi': - 'http://ppapi.googlecode.com/svn', - 'pywebsocket': - 'http://pywebsocket.googlecode.com/svn', - 'libaddressinput': - 'http://libaddressinput.googlecode.com/svn', - 'pyftpdlib': - 'http://pyftpdlib.googlecode.com/svn', - 'google-url': - 'http://google-url.googlecode.com/svn', - 'googletest': - 'http://googletest.googlecode.com/svn', - 'gyp': - 'http://gyp.googlecode.com/svn', - 'seccompsandbox': - 'http://seccompsandbox.googlecode.com/svn', - 'ots': - 'http://ots.googlecode.com/svn', - 'angleproject': - 'http://angleproject.googlecode.com/svn', - 'pefile': - 'http://pefile.googlecode.com/svn', - 'open-vcdiff': - 'http://open-vcdiff.googlecode.com/svn', - 'linux-syscall-support': - 'http://linux-syscall-support.googlecode.com/svn', - 'jsoncpp': - 'http://svn.code.sf.net/p/jsoncpp/code', - 'webrtc': - 'http://webrtc.googlecode.com/svn', - 'web-page-replay': - 'http://web-page-replay.googlecode.com/svn', - 'libjingle': - 'http://libjingle.googlecode.com/svn', - 'cld2': - 'https://cld2.googlecode.com/svn', - 'google-cache-invalidation-api': - 'http://google-cache-invalidation-api.googlecode.com/svn', - 'jsr-305': - 'http://jsr-305.googlecode.com/svn', - 'angle_revision': - '99f075dade7cfb0b56e80a065de3218745e4c177', - 'bidichecker': - 'http://bidichecker.googlecode.com/svn', - 'git_url': - 'https://chromium.googlesource.com', - 'native_client': - 'http://src.chromium.org/native_client', - 'trace-viewer': - 'http://trace-viewer.googlecode.com/svn', - 'leveldb': - 'http://leveldb.googlecode.com/svn', - 'webkit_trunk': - 'http://src.chromium.org/blink/trunk', - 'googlemock': - 'http://googlemock.googlecode.com/svn', - 'grit-i18n': - 'http://grit-i18n.googlecode.com/svn', - 'pdfsqueeze': - 'http://pdfsqueeze.googlecode.com/svn', - 'protobuf': - 'http://protobuf.googlecode.com/svn', - 'smhasher': - 'http://smhasher.googlecode.com/svn', - 'google-toolbox-for-mac': - 'http://google-toolbox-for-mac.googlecode.com/svn', - 'libyuv': - 'http://libyuv.googlecode.com/svn', - 'rlz': - 'http://rlz.googlecode.com/svn', - 'v8': - 'http://v8.googlecode.com/svn', - 'octane-benchmark': - 'http://octane-benchmark.googlecode.com/svn', - 'sfntly': - 'http://sfntly.googlecode.com/svn', - 'sctp-refimpl': - 'https://sctp-refimpl.googlecode.com/svn', - 'libphonenumber': - 'http://libphonenumber.googlecode.com/svn', - 'pymox': - 'http://pymox.googlecode.com/svn', - 'google-safe-browsing': - 'http://google-safe-browsing.googlecode.com/svn' -} - -deps = { - 'build': - Var('git_url') + '/chromium/tools/build.git@ad95e885714a6d2dfb9a1da8edea1a3ebc23466c', - 'build/scripts/command_wrapper/bin': - Var('git_url') + '/chromium/tools/command_wrapper/bin.git@2eeebba9a512cae9e4e9312f5ec728dbdad80bd0', - 'build/scripts/gsd_generate_index': - Var('git_url') + '/chromium/tools/gsd_generate_index.git@d2f5d5a5d212d8fb337d751c0351644a6ac83ac8', - 'build/scripts/private/data/reliability': - Var('git_url') + '/chromium/src/chrome/test/data/reliability.git@ba644102a2f81bb33582e9474a10812fef825389', - 'build/scripts/tools/deps2git': - Var('git_url') + '/chromium/tools/deps2git.git@27ce444f50f3c6732982d225d3f4cf67f0979a98', - 'build/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'depot_tools': - Var('git_url') + '/chromium/tools/depot_tools.git@46309bf41f2cde51a180d8e011adfd5467a23ec6', - 'src/breakpad/src': - Var('git_url') + '/external/google-breakpad/src.git@39f710989688f8e1a1c7e7f7c1ecd827f2b1a1f4', - 'src/buildtools': - Var('git_url') + '/chromium/buildtools.git@3b302fef93f7cc58d9b8168466905237484b2772', - 'src/chrome/test/data/perf/canvas_bench': - Var('git_url') + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', - 'src/chrome/test/data/perf/frame_rate/content': - Var('git_url') + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', - 'src/media/cdm/ppapi/api': - Var('git_url') + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', - 'src/native_client': - Var('git_url') + '/native_client/src/native_client.git@bd095c3ad5f1f25a9c6f44b7f38cec89383a5c33', - 'src/sdch/open-vcdiff': - Var('git_url') + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', - 'src/testing/gmock': - Var('git_url') + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', - 'src/testing/gtest': - Var('git_url') + '/external/googletest.git@be1868139ffe0ccd0e8e3b37292b84c821d9c8ad', - 'src/third_party/WebKit': - Var('webkit_url') + '' + Var('webkit_rev'), - 'src/third_party/angle': - Var('git_url') + '/angle/angle.git' + '@' + Var('angle_revision'), - 'src/third_party/bidichecker': - Var('git_url') + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', - 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git@f78fa1ea33906e35c40e9163303c982de4272318', - 'src/third_party/cacheinvalidation/src': - Var('git_url') + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', - 'src/third_party/cld_2/src': - Var('git_url') + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', - 'src/third_party/colorama/src': - Var('git_url') + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - 'src/third_party/crashpad/crashpad': - Var('git_url') + '/crashpad/crashpad.git@1baff4ff92fe1a1ead6b88b5f01633a4f0b6b51c', - 'src/third_party/dom_distiller_js/dist': - Var('git_url') + '/external/github.com/chromium/dom-distiller-dist.git@419c7e659cf1b35763d5e6ce4a757fe15f4f37db', - 'src/third_party/ffmpeg': - Var('git_url') + '/chromium/third_party/ffmpeg.git@104f872faf2cd809cdada885a1e39be85e5b3316', - 'src/third_party/flac': - Var('git_url') + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', - 'src/third_party/hunspell': - Var('git_url') + '/chromium/deps/hunspell.git@c956c0e97af00ef789afb2f64d02c9a5a50e6eb1', - 'src/third_party/hunspell_dictionaries': - Var('git_url') + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', - 'src/third_party/icu': - Var('git_url') + '/chromium/deps/icu.git@e4c31439828d356525b71ef81a6d61ea50d7d673', - 'src/third_party/jsoncpp/source/include': - Var('git_url') + '/external/jsoncpp/jsoncpp/include.git@b0dd48e02b6e6248328db78a65b5c601f150c349', - 'src/third_party/jsoncpp/source/src/lib_json': - Var('git_url') + '/external/jsoncpp/jsoncpp/src/lib_json.git@a8caa51ba2f80971a45880425bf2ae864a786784', - 'src/third_party/leveldatabase/src': - Var('git_url') + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', - 'src/third_party/libaddressinput/src': - Var('git_url') + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', - 'src/third_party/libexif/sources': - Var('git_url') + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', - 'src/third_party/libjingle/source/talk': - Var('git_url') + '/external/webrtc/trunk/talk.git@2cb8e9c251330d6886134955158aceaec53c2dad', - 'src/third_party/libjpeg_turbo': - Var('git_url') + '/chromium/deps/libjpeg_turbo.git@034e9a9747e0983bc19808ea70e469bc8342081f', - 'src/third_party/libphonenumber/src/phonenumbers': - Var('git_url') + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', - 'src/third_party/libphonenumber/src/resources': - Var('git_url') + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', - 'src/third_party/libphonenumber/src/test': - Var('git_url') + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', - 'src/third_party/libsrtp': - Var('git_url') + '/chromium/deps/libsrtp.git@6446144c7f083552f21cc4e6768e891bcb767574', - 'src/third_party/libvpx': - Var('git_url') + '/chromium/deps/libvpx.git@ea4ce75ca4525ad42dd90b2a210f99bd2b3a7c03', - 'src/third_party/libyuv': - Var('git_url') + '/external/libyuv.git@d204db647e591ccf0e2589236ecea90330d65a66', - 'src/third_party/mesa/src': - Var('git_url') + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', - 'src/third_party/openmax_dl': - Var('git_url') + '/external/webrtc/deps/third_party/openmax.git@0b238cb62c32b6f45680cf577eddb1b051ae0219', - 'src/third_party/opus/src': - Var('git_url') + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', - 'src/third_party/pdfium': - 'https://pdfium.googlesource.com/pdfium.git@e3471ff2929949f46004a8d55762d2e7d259b6c4', - 'src/third_party/py_trace_event/src': - Var('git_url') + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', - 'src/third_party/pyftpdlib/src': - Var('git_url') + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', - 'src/third_party/pywebsocket/src': - Var('git_url') + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', - 'src/third_party/safe_browsing/testing': - Var('git_url') + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', - 'src/third_party/scons-2.0.1': - Var('git_url') + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', - 'src/third_party/sfntly/cpp/src': - Var('git_url') + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', - 'src/third_party/skia': - Var('git_url') + '/skia.git@969098603fc16538a5f5acd3f9c1cf0269faa039', - 'src/third_party/smhasher/src': - Var('git_url') + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', - 'src/third_party/snappy/src': - Var('git_url') + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', - 'src/third_party/swig/Lib': - Var('git_url') + '/chromium/deps/swig/Lib.git@f2a695d52e61e6a8d967731434f165ed400f0d69', - 'src/third_party/trace-viewer': - Var('git_url') + '/external/trace-viewer.git@ff20313e37892c3c7f20c88bb22ab6f6e65659ae', - 'src/third_party/usrsctp/usrsctplib': - Var('git_url') + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', - 'src/third_party/webdriver/pylib': - Var('git_url') + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', - 'src/third_party/webgl/src': - Var('git_url') + '/external/khronosgroup/webgl.git@0c2bcf36a740181f50ce94a0eaad357219441dee', - 'src/third_party/webpagereplay': - Var('git_url') + '/external/github.com/chromium/web-page-replay.git@94d7e2a265facfbb0570a9a7fd6c335c774ee866', - 'src/third_party/webrtc': - Var('git_url') + '/external/webrtc/trunk/webrtc.git@0528a0544e300cfce85fe14c22f7fc22dee0e116', - 'src/third_party/yasm/source/patched-yasm': - Var('git_url') + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', - 'src/tools/deps2git': - Var('git_url') + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', - 'src/tools/grit': - Var('git_url') + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', - 'src/tools/gyp': - Var('git_url') + '/external/gyp.git@2889664b9fa88cce175c5c7cdf207d28420a7412', - 'src/tools/page_cycler/acid3': - Var('git_url') + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', - 'src/tools/swarming_client': - Var('git_url') + '/external/swarming.client.git@13e7c88b5a9494467259603486f001694ea85721', - 'src/v8': - Var('git_url') + '/v8/v8.git@54a314f7624b4e0a71968b8d62b0d69f6027fc20', -} - -deps_os = { - 'android': - { - 'src/pdf': - None, - 'src/third_party/android_protobuf/src': - Var('git_url') + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', - 'src/third_party/android_tools': - Var('git_url') + '/android_tools.git@1c8df186756bedd686bd293b65065ee6ae321d21', - 'src/third_party/apache-mime4j': - Var('git_url') + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', - 'src/third_party/appurify-python/src': - Var('git_url') + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', - 'src/third_party/elfutils/src': - Var('git_url') + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', - 'src/third_party/findbugs': - Var('git_url') + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', - 'src/third_party/freetype': - Var('git_url') + '/chromium/src/third_party/freetype.git@fd6919ac23f74b876c209aba5eaa2be662086391', - 'src/third_party/httpcomponents-client': - Var('git_url') + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', - 'src/third_party/httpcomponents-core': - Var('git_url') + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', - 'src/third_party/jarjar': - Var('git_url') + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', - 'src/third_party/jsr-305/src': - Var('git_url') + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', - 'src/third_party/junit/src': - Var('git_url') + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', - 'src/third_party/lss': - Var('git_url') + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', - 'src/third_party/mockito/src': - Var('git_url') + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', - 'src/third_party/requests/src': - Var('git_url') + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', - 'src/third_party/robolectric/lib': - Var('git_url') + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810', - }, - 'ios': - { - 'src/chrome/test/data/perf/canvas_bench': - None, - 'src/chrome/test/data/perf/frame_rate/content': - None, - 'src/ios/third_party/gcdwebserver/src': - Var('git_url') + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', - 'src/native_client': - None, - 'src/testing/iossim/third_party/class-dump': - Var('git_url') + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', - 'src/third_party/ffmpeg': - None, - 'src/third_party/google_toolbox_for_mac/src': - Var('git_url') + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', - 'src/third_party/hunspell': - None, - 'src/third_party/hunspell_dictionaries': - None, - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@d1edb68688b91a380fb2025b3420fad68db54ed6', - 'src/third_party/webgl': - None, - }, - 'mac': - { - 'src/chrome/installer/mac/third_party/xz/xz': - Var('git_url') + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', - 'src/chrome/tools/test/reference_build/chrome_mac': - Var('git_url') + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', - 'src/third_party/google_toolbox_for_mac/src': - Var('git_url') + '/external/google-toolbox-for-mac.git@17eee6933bb4a978bf045ef1b12fc68f15b08cd2', - 'src/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', - 'src/third_party/pdfsqueeze': - Var('git_url') + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f', - 'src/third_party/swig/mac': - Var('git_url') + '/chromium/deps/swig/mac.git@1b182eef16df2b506f1d710b34df65d55c1ac44e', - }, - 'unix': - { - 'build/third_party/xvfb': - Var('git_url') + '/chromium/tools/third_party/xvfb.git@aebb1aadf1422e4d81e831e13746b8f7ae322e07', - 'src/chrome/tools/test/reference_build/chrome_linux': - Var('git_url') + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', - 'src/third_party/chromite': - Var('git_url') + '/chromiumos/chromite.git@fdc9440cb96f8de35202abc285ffb896e04292d3', - 'src/third_party/cros_system_api': - Var('git_url') + '/chromiumos/platform/system_api.git@b5515b112c2800763f96e8c851b6f7b9e0acba1c', - 'src/third_party/fontconfig/src': - Var('git_url') + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', - 'src/third_party/freetype2/src': - Var('git_url') + '/chromium/src/third_party/freetype2.git@495a23fce9cd125f715dc20643d14fed226d76ac', - 'src/third_party/liblouis/src': - Var('git_url') + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', - 'src/third_party/lss': - Var('git_url') + '/external/linux-syscall-support/lss.git@e079768b7e3a94dcbe7d338496c0c3bde7151b6e', - 'src/third_party/pyelftools': - Var('git_url') + '/chromiumos/third_party/pyelftools.git@19b3e610c86fcadb837d252c794cb5e8008826ae', - 'src/third_party/stp/src': - Var('git_url') + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', - 'src/third_party/swig/linux': - Var('git_url') + '/chromium/deps/swig/linux.git@866b8e0e0e0cfe99ebe608260030916ca0c3f92d', - 'src/third_party/undoview': - Var('git_url') + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', - 'src/third_party/xdg-utils': - Var('git_url') + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d', - }, - 'win': - { - 'src/chrome/tools/test/reference_build/chrome_win': - Var('git_url') + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', - 'src/third_party/bison': - Var('git_url') + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', - 'src/third_party/cygwin': - Var('git_url') + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', - 'src/third_party/gnu_binutils': - Var('git_url') + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', - 'src/third_party/gperf': - Var('git_url') + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', - 'src/third_party/lighttpd': - Var('git_url') + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - 'src/third_party/mingw-w64/mingw/bin': - Var('git_url') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', - 'src/third_party/nacl_sdk_binaries': - Var('git_url') + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', - 'src/third_party/nss': - Var('git_url') + '/chromium/deps/nss.git@bb4e75a43d007518ae7d618665ea2f25b0c60b63', - 'src/third_party/omaha/src/omaha': - Var('git_url') + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', - 'src/third_party/pefile': - Var('git_url') + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', - 'src/third_party/perl': - Var('git_url') + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', - 'src/third_party/psyco_win32': - Var('git_url') + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', - 'src/third_party/swig/win': - Var('git_url') + '/chromium/deps/swig/win.git@986f013ba518541adf5c839811efb35630a31031', - 'src/third_party/yasm/binaries': - Var('git_url') + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881', - }, -} - -include_rules = [ - '+base', - '+build', - '+ipc', - '+library_loaders', - '+testing', - '+third_party/icu/source/common/unicode', - '+third_party/icu/source/i18n/unicode', - '+url' -] - -skip_child_includes = [ - 'breakpad', - 'native_client_sdk', - 'out', - 'sdch', - 'skia', - 'testing', - 'v8', - 'win8' -] - -hooks = [ - { - 'action': - [ - 'python', - 'src/build/landmines.py' -], - 'pattern': - '.', - 'name': - 'landmines' -}, - { - 'action': - [ - 'python', - 'src/build/download_nacl_toolchains.py', - '--mode', - 'nacl_core_sdk', - 'sync', - '--extract' -], - 'pattern': - '.', - 'name': - 'nacltools' -}, - { - 'action': - [ - 'python', - 'src/build/download_sdk_extras.py' -], - 'pattern': - '.', - 'name': - 'sdkextras' -}, - { - 'action': - [ - 'python', - 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py', - '--linux-only' -], - 'pattern': - '.', - 'name': - 'sysroot' -}, - { - 'action': - [ - 'python', - 'src/build/vs_toolchain.py', - 'update' -], - 'pattern': - '.', - 'name': - 'win_toolchain' -}, - { - 'action': - [ - 'python', - 'src/tools/clang/scripts/update.py', - '--if-needed' -], - 'pattern': - '.', - 'name': - 'clang' -}, - { - 'action': - [ - 'python', - 'src/build/util/lastchange.py', - '-o', - 'src/build/util/LASTCHANGE' -], - 'pattern': - '.', - 'name': - 'lastchange' -}, - { - 'action': - [ - 'python', - 'src/build/util/lastchange.py', - '-s', - 'src/third_party/WebKit', - '-o', - 'src/build/util/LASTCHANGE.blink' -], - 'pattern': - '.', - 'name': - 'lastchange' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/win/gn.exe.sha1' -], - 'pattern': - '.', - 'name': - 'gn_win' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/mac/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_mac' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/linux32/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_linux32' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-gn', - '-s', - 'src/buildtools/linux64/gn.sha1' -], - 'pattern': - '.', - 'name': - 'gn_linux64' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/win/clang-format.exe.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_win' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/mac/clang-format.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_mac' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-clang-format', - '-s', - 'src/buildtools/linux64/clang-format.sha1' -], - 'pattern': - '.', - 'name': - 'clang_format_linux' -}, - { - 'action': - [ - 'python', - 'src/third_party/binutils/download.py' -], - 'pattern': - 'src/third_party/binutils', - 'name': - 'binutils' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', - 'chromium-eu-strip', - '-s', - 'src/build/linux/bin/eu-strip.sha1' -], - 'pattern': - '.', - 'name': - 'eu-strip' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', - 'chromium-drmemory', - '-s', - 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1' -], - 'pattern': - '.', - 'name': - 'drmemory' -}, - { - 'action': - [ - 'python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/syzygy/binaries', - '--revision=e869aa03e0f40f74321a70d6d4578f5bbbc29bda', - '--overwrite' -], - 'pattern': - '.', - 'name': - 'syzygy-binaries' -}, - { - 'action': - [ - 'python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/kasko', - '--revision=3278b959bdf6c9aa4b326a38e8b953e566c1ec58', - '--resource=kasko.zip', - '--resource=kasko_symbols.zip', - '--overwrite' -], - 'pattern': - '.', - 'name': - 'kasko' -}, - { - 'action': - [ - 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--directory', - '--recursive', - '--no_auth', - '--num_threads=16', - '--bucket', - 'chromium-apache-win32', - 'src/third_party/apache-win32' -], - 'pattern': - '\\.sha1', - 'name': - 'apache_win32' -}, - { - 'action': - [ - 'python', - 'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py', - '--tools-directory=../../../../../../tools' -], - 'pattern': - '', - 'name': - 'download_mojo_shell' -}, - { - 'action': - [ - 'python', - 'src/third_party/instrumented_libraries/scripts/download_binaries.py' -], - 'pattern': - '\\.sha1', - 'name': - 'instrumented_libraries' -}, - { - 'action': - [ - 'python', - 'src/build/gyp_chromium' -], - 'pattern': - '.', - 'name': - 'gyp' -}, - { - 'action': - [ - 'python', - 'src/tools/check_git_config.py', - '--running-as-hook' -], - 'pattern': - '.', - 'name': - 'check_git_config' -}, - { - 'action': - [ - 'python', - 'src/tools/remove_stale_pyc_files.py', - 'src/tools' -], - 'pattern': - 'src/tools/.*\\.py', - 'name': - 'remove_stale_pyc_files' -}, - { - 'action': - [ - 'python', - 'build/scripts/tools/runit.py', - 'python', - 'build/scripts/common/cros_chromite.py', - '-v' -], - 'pattern': - '.*/cros_chromite\\.py' -} -] diff -Nru chromium-browser-43.0.2357.81/extensions/browser/api/app_window/app_window_api.cc chromium-browser-43.0.2357.130/extensions/browser/api/app_window/app_window_api.cc --- chromium-browser-43.0.2357.81/extensions/browser/api/app_window/app_window_api.cc 2015-05-25 19:00:27.000000000 +0000 +++ chromium-browser-43.0.2357.130/extensions/browser/api/app_window/app_window_api.cc 2015-06-22 22:56:51.000000000 +0000 @@ -335,8 +335,10 @@ AppWindowClient::Get()->CreateAppWindow(browser_context(), extension()); app_window->Init(url, new AppWindowContentsImpl(app_window), create_params); - if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()) + if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode() && + !app_window->is_ime_window()) { app_window->ForcedFullscreen(); + } content::RenderViewHost* created_view = app_window->web_contents()->GetRenderViewHost(); diff -Nru chromium-browser-43.0.2357.81/extensions/browser/api/app_window/app_window_apitest.cc chromium-browser-43.0.2357.130/extensions/browser/api/app_window/app_window_apitest.cc --- chromium-browser-43.0.2357.81/extensions/browser/api/app_window/app_window_apitest.cc 2015-05-25 19:00:27.000000000 +0000 +++ chromium-browser-43.0.2357.130/extensions/browser/api/app_window/app_window_apitest.cc 2015-06-16 19:01:21.000000000 +0000 @@ -6,6 +6,7 @@ #include "base/strings/string_number_conversions.h" #include "chrome/browser/apps/app_browsertest_util.h" #include "chrome/browser/ui/browser.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/features/feature_channel.h" #include "chrome/test/base/testing_profile.h" #include "extensions/browser/app_window/app_window.h" @@ -198,6 +199,18 @@ "platform_apps/windows_api_ime/no_permissions_platform_app")) << message_; } + +IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, + WindowsApiImeWindowNotFullscreen) { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + command_line->AppendSwitch(switches::kForceAppMode); + command_line->AppendSwitchASCII(switches::kAppId, + "jkghodnilhceideoidjikpgommlajknk"); + + EXPECT_TRUE(RunComponentExtensionTest( + "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) + << message_; +} #endif // OS_CHROMEOS } // namespace extensions diff -Nru chromium-browser-43.0.2357.81/extensions/browser/event_router.cc chromium-browser-43.0.2357.130/extensions/browser/event_router.cc --- chromium-browser-43.0.2357.81/extensions/browser/event_router.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/extensions/browser/event_router.cc 2015-06-22 22:56:51.000000000 +0000 @@ -155,14 +155,30 @@ const EventFilteringInfo& info) { int event_id = g_extension_event_id.GetNext(); +#if defined(OS_CHROMEOS) + if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { + // This is called from WebRequest API. + // TODO(lazyboy): Skip this entirely: http://crbug.com/488747. + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&EventRouter::IncrementInFlightEventsOnUI, + browser_context_id, extension_id, event_id, event_name)); + } else { + IncrementInFlightEventsOnUI(browser_context_id, extension_id, event_id, + event_name); + } +#endif + DispatchExtensionMessage(ipc_sender, browser_context_id, extension_id, event_id, event_name, event_args.get(), user_gesture, info); +#if !defined(OS_CHROMEOS) BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&EventRouter::IncrementInFlightEventsOnUI, browser_context_id, extension_id, event_id, event_name)); +#endif } EventRouter::EventRouter(BrowserContext* browser_context, diff -Nru chromium-browser-43.0.2357.81/extensions/DEPS chromium-browser-43.0.2357.130/extensions/DEPS --- chromium-browser-43.0.2357.81/extensions/DEPS 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/extensions/DEPS 2015-06-22 22:56:51.000000000 +0000 @@ -47,6 +47,7 @@ "+chrome/browser/extensions/test_extension_prefs.h", "+chrome/browser/extensions/test_extension_system.h", "+chrome/browser/ui/browser.h", + "+chrome/common/chrome_switches.h", "+chrome/common/extensions/features/feature_channel.h", "+chrome/test/base/chrome_render_view_test.h", "+chrome/test/base/testing_profile.h", diff -Nru chromium-browser-43.0.2357.81/gpu/command_buffer/service/feature_info.cc chromium-browser-43.0.2357.130/gpu/command_buffer/service/feature_info.cc --- chromium-browser-43.0.2357.81/gpu/command_buffer/service/feature_info.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/gpu/command_buffer/service/feature_info.cc 2015-06-22 22:56:51.000000000 +0000 @@ -1017,38 +1017,40 @@ feature_flags_.chromium_sync_query = true; } - bool blend_equation_advanced_coherent = - extensions.Contains("GL_NV_blend_equation_advanced_coherent") || - extensions.Contains("GL_KHR_blend_equation_advanced_coherent"); + if (!workarounds_.disable_blend_equation_advanced) { + bool blend_equation_advanced_coherent = + extensions.Contains("GL_NV_blend_equation_advanced_coherent") || + extensions.Contains("GL_KHR_blend_equation_advanced_coherent"); - if (blend_equation_advanced_coherent || - extensions.Contains("GL_NV_blend_equation_advanced") || - extensions.Contains("GL_KHR_blend_equation_advanced")) { - const GLenum equations[] = {GL_MULTIPLY_KHR, - GL_SCREEN_KHR, - GL_OVERLAY_KHR, - GL_DARKEN_KHR, - GL_LIGHTEN_KHR, - GL_COLORDODGE_KHR, - GL_COLORBURN_KHR, - GL_HARDLIGHT_KHR, - GL_SOFTLIGHT_KHR, - GL_DIFFERENCE_KHR, - GL_EXCLUSION_KHR, - GL_HSL_HUE_KHR, - GL_HSL_SATURATION_KHR, - GL_HSL_COLOR_KHR, - GL_HSL_LUMINOSITY_KHR}; + if (blend_equation_advanced_coherent || + extensions.Contains("GL_NV_blend_equation_advanced") || + extensions.Contains("GL_KHR_blend_equation_advanced")) { + const GLenum equations[] = {GL_MULTIPLY_KHR, + GL_SCREEN_KHR, + GL_OVERLAY_KHR, + GL_DARKEN_KHR, + GL_LIGHTEN_KHR, + GL_COLORDODGE_KHR, + GL_COLORBURN_KHR, + GL_HARDLIGHT_KHR, + GL_SOFTLIGHT_KHR, + GL_DIFFERENCE_KHR, + GL_EXCLUSION_KHR, + GL_HSL_HUE_KHR, + GL_HSL_SATURATION_KHR, + GL_HSL_COLOR_KHR, + GL_HSL_LUMINOSITY_KHR}; - for (GLenum equation : equations) - validators_.equation.AddValue(equation); - if (blend_equation_advanced_coherent) - AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); + for (GLenum equation : equations) + validators_.equation.AddValue(equation); + if (blend_equation_advanced_coherent) + AddExtensionString("GL_KHR_blend_equation_advanced_coherent"); - AddExtensionString("GL_KHR_blend_equation_advanced"); - feature_flags_.blend_equation_advanced = true; - feature_flags_.blend_equation_advanced_coherent = - blend_equation_advanced_coherent; + AddExtensionString("GL_KHR_blend_equation_advanced"); + feature_flags_.blend_equation_advanced = true; + feature_flags_.blend_equation_advanced_coherent = + blend_equation_advanced_coherent; + } } if (extensions.Contains("GL_NV_path_rendering")) { diff -Nru chromium-browser-43.0.2357.81/gpu/command_buffer/service/feature_info_unittest.cc chromium-browser-43.0.2357.130/gpu/command_buffer/service/feature_info_unittest.cc --- chromium-browser-43.0.2357.81/gpu/command_buffer/service/feature_info_unittest.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/gpu/command_buffer/service/feature_info_unittest.cc 2015-06-22 22:56:51.000000000 +0000 @@ -1386,6 +1386,18 @@ EXPECT_FALSE(gfx::GLFence::IsSupported()); } +TEST_F(FeatureInfoTest, BlendEquationAdvancedDisabled) { + base::CommandLine command_line(0, NULL); + command_line.AppendSwitchASCII( + switches::kGpuDriverBugWorkarounds, + base::IntToString(gpu::DISABLE_BLEND_EQUATION_ADVANCED)); + SetupInitExpectationsWithCommandLine( + "GL_KHR_blend_equation_advanced_coherent GL_KHR_blend_equation_advanced", + command_line); + EXPECT_FALSE(info_->feature_flags().blend_equation_advanced); + EXPECT_FALSE(info_->feature_flags().blend_equation_advanced_coherent); +} + TEST_F(FeatureInfoTest, InitializeCHROMIUM_path_rendering) { SetupInitExpectationsWithGLVersion( "GL_ARB_compatibility GL_NV_path_rendering GL_EXT_direct_state_access", diff -Nru chromium-browser-43.0.2357.81/gpu/config/gpu_driver_bug_list_json.cc chromium-browser-43.0.2357.130/gpu/config/gpu_driver_bug_list_json.cc --- chromium-browser-43.0.2357.81/gpu/config/gpu_driver_bug_list_json.cc 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/gpu/config/gpu_driver_bug_list_json.cc 2015-06-22 22:56:52.000000000 +0000 @@ -19,7 +19,7 @@ { "name": "gpu driver bug list", // Please update the version number whenever you change this file. - "version": "8.06", + "version": "8.07", "entries": [ { "id": 1, @@ -1259,6 +1259,19 @@ "features": [ "disable_egl_khr_wait_sync" ] + }, + { + "id": 117, + "description": "GL_KHR_blend_equation_advanced breaks blending on Adreno 4xx", + "cr_bugs": [488485], + "os": { + "type": "android" + }, + "gl_vendor": "Qualcomm.*", + "gl_renderer": ".*4\\d\\d", + "features": [ + "disable_blend_equation_advanced" + ] } ] } diff -Nru chromium-browser-43.0.2357.81/gpu/config/gpu_driver_bug_workaround_type.h chromium-browser-43.0.2357.130/gpu/config/gpu_driver_bug_workaround_type.h --- chromium-browser-43.0.2357.81/gpu/config/gpu_driver_bug_workaround_type.h 2015-05-25 19:17:42.000000000 +0000 +++ chromium-browser-43.0.2357.130/gpu/config/gpu_driver_bug_workaround_type.h 2015-06-22 22:56:52.000000000 +0000 @@ -24,6 +24,8 @@ disable_arb_sync) \ GPU_OP(DISABLE_ASYNC_READPIXELS, \ disable_async_readpixels) \ + GPU_OP(DISABLE_BLEND_EQUATION_ADVANCED, \ + disable_blend_equation_advanced) \ GPU_OP(DISABLE_CHROMIUM_FRAMEBUFFER_MULTISAMPLE, \ disable_chromium_framebuffer_multisample) \ GPU_OP(DISABLE_D3D11, \ diff -Nru chromium-browser-43.0.2357.81/media/midi/midi_manager_win.cc chromium-browser-43.0.2357.130/media/midi/midi_manager_win.cc --- chromium-browser-43.0.2357.81/media/midi/midi_manager_win.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/media/midi/midi_manager_win.cc 2015-06-22 22:56:52.000000000 +0000 @@ -305,6 +305,12 @@ } } +bool IsUnsupportedDevice(const MidiDeviceInfo& info) { + return info.manufacturer_id == MM_MICROSOFT && + (info.product_id == MM_MSFT_WDMAUDIO_MIDIOUT || + info.product_id == MM_MSFT_GENERIC_MIDISYNTH); +} + using PortNumberCache = base::hash_map< MidiDeviceInfo, std::priority_queue, std::greater>, @@ -828,6 +834,8 @@ make_scoped_refptr(new MidiOutputDeviceState(MidiDeviceInfo(caps))); state->midi_handle = midi_out_handle; const auto& state_device_info = state->device_info; + if (IsUnsupportedDevice(state_device_info)) + return; bool add_new_port = false; uint32 port_number = 0; { diff -Nru chromium-browser-43.0.2357.81/media/renderers/audio_renderer_impl.cc chromium-browser-43.0.2357.130/media/renderers/audio_renderer_impl.cc --- chromium-browser-43.0.2357.81/media/renderers/audio_renderer_impl.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/media/renderers/audio_renderer_impl.cc 2015-06-22 22:56:52.000000000 +0000 @@ -135,6 +135,7 @@ base::AutoUnlock auto_unlock(lock_); sink_->Pause(); + stop_rendering_time_ = last_render_time_; } void AudioRendererImpl::SetMediaTime(base::TimeDelta time) { @@ -147,7 +148,7 @@ start_timestamp_ = time; ended_timestamp_ = kInfiniteDuration(); - last_render_ticks_ = base::TimeTicks(); + last_render_time_ = stop_rendering_time_ = base::TimeTicks(); first_packet_timestamp_ = kNoTimestamp(); audio_clock_.reset(new AudioClock(time, audio_parameters_.sample_rate())); } @@ -168,8 +169,11 @@ base::TimeTicks AudioRendererImpl::GetWallClockTime(base::TimeDelta time) { base::AutoLock auto_lock(lock_); - if (last_render_ticks_.is_null() || playback_rate_ == 0.0) + if (last_render_time_.is_null() || !stop_rendering_time_.is_null() || + !playback_rate_ || buffering_state_ != BUFFERING_HAVE_ENOUGH || + !sink_playing_) { return base::TimeTicks(); + } base::TimeDelta base_time; if (time < audio_clock_->front_timestamp()) { @@ -179,12 +183,12 @@ base_time = audio_clock_->back_timestamp(); } else { // No need to estimate time, so return the actual wallclock time. - return last_render_ticks_ + audio_clock_->TimeUntilPlayback(time); + return last_render_time_ + audio_clock_->TimeUntilPlayback(time); } // In practice, most calls will be estimates given the relatively small window // in which clients can get the actual time. - return last_render_ticks_ + audio_clock_->TimeUntilPlayback(base_time) + + return last_render_time_ + audio_clock_->TimeUntilPlayback(base_time) + base::TimeDelta::FromMicroseconds((time - base_time).InMicroseconds() / playback_rate_); } @@ -580,7 +584,12 @@ int frames_written = 0; { base::AutoLock auto_lock(lock_); - last_render_ticks_ = base::TimeTicks::Now(); + last_render_time_ = base::TimeTicks::Now(); + + if (!stop_rendering_time_.is_null()) { + // TODO(dalecurtis): Use |stop_rendering_time_| to advance the AudioClock. + stop_rendering_time_ = base::TimeTicks(); + } // Ensure Stop() hasn't destroyed our |algorithm_| on the pipeline thread. if (!algorithm_) { diff -Nru chromium-browser-43.0.2357.81/media/renderers/audio_renderer_impl.h chromium-browser-43.0.2357.130/media/renderers/audio_renderer_impl.h --- chromium-browser-43.0.2357.81/media/renderers/audio_renderer_impl.h 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/media/renderers/audio_renderer_impl.h 2015-06-22 22:56:52.000000000 +0000 @@ -256,7 +256,11 @@ // Set every Render() and used to provide an interpolated time value to // CurrentMediaTimeForSyncingVideo(). - base::TimeTicks last_render_ticks_; + base::TimeTicks last_render_time_; + + // Set to the value of |last_render_time_| when StopRendering_Locked() is + // called for any reason. Cleared by the next successful Render() call. + base::TimeTicks stop_rendering_time_; // Set upon receipt of the first decoded buffer after a StartPlayingFrom(). // Used to determine how long to delay playback. diff -Nru chromium-browser-43.0.2357.81/media/renderers/renderer_impl.cc chromium-browser-43.0.2357.130/media/renderers/renderer_impl.cc --- chromium-browser-43.0.2357.81/media/renderers/renderer_impl.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/media/renderers/renderer_impl.cc 2015-06-22 22:56:52.000000000 +0000 @@ -393,6 +393,10 @@ DCHECK_EQ(state_, STATE_FLUSHING); DCHECK(!flush_cb_.is_null()); + // If we had a deferred video renderer underflow prior to the flush, it should + // have been cleared by the audio renderer changing to BUFFERING_HAVE_NOTHING. + DCHECK(deferred_underflow_cb_.IsCancelled()); + DCHECK_EQ(audio_buffering_state_, BUFFERING_HAVE_NOTHING); audio_ended_ = false; FlushVideoRenderer(); @@ -445,10 +449,12 @@ bool was_waiting_for_enough_data = WaitingForEnoughData(); - // When audio is present, defer underflow callbacks for some time to avoid - // unnecessary glitches in audio; see http://crbug.com/144683#c53. + // When audio is present and has enough data, defer video underflow callbacks + // for some time to avoid unnecessary glitches in audio; see + // http://crbug.com/144683#c53. if (audio_renderer_ && !is_audio && state_ == STATE_PLAYING) { if (video_buffering_state_ == BUFFERING_HAVE_ENOUGH && + audio_buffering_state_ == BUFFERING_HAVE_ENOUGH && new_buffering_state == BUFFERING_HAVE_NOTHING && deferred_underflow_cb_.IsCancelled()) { deferred_underflow_cb_.Reset(base::Bind( diff -Nru chromium-browser-43.0.2357.81/media/renderers/renderer_impl_unittest.cc chromium-browser-43.0.2357.130/media/renderers/renderer_impl_unittest.cc --- chromium-browser-43.0.2357.81/media/renderers/renderer_impl_unittest.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/media/renderers/renderer_impl_unittest.cc 2015-06-22 22:56:52.000000000 +0000 @@ -532,4 +532,42 @@ base::RunLoop().RunUntilIdle(); } +TEST_F(RendererImplTest, VideoUnderflowWithAudioFlush) { + InitializeWithAudioAndVideo(); + Play(); + + // Set a massive threshold such that it shouldn't fire within this test. + renderer_impl_->set_video_underflow_threshold_for_testing( + base::TimeDelta::FromSeconds(100)); + + // Simulate the cases where audio underflows and then video underflows. + EXPECT_CALL(time_source_, StopTicking()); + audio_buffering_state_cb_.Run(BUFFERING_HAVE_NOTHING); + video_buffering_state_cb_.Run(BUFFERING_HAVE_NOTHING); + Mock::VerifyAndClearExpectations(&time_source_); + + // Flush the audio and video renderers, both think they're in an underflow + // state, but if the video renderer underflow was deferred, RendererImpl would + // think it still has enough data. + EXPECT_CALL(*audio_renderer_, Flush(_)).WillOnce(RunClosure<0>()); + EXPECT_CALL(*video_renderer_, Flush(_)).WillOnce(RunClosure<0>()); + EXPECT_CALL(callbacks_, OnFlushed()); + renderer_impl_->Flush( + base::Bind(&CallbackHelper::OnFlushed, base::Unretained(&callbacks_))); + base::RunLoop().RunUntilIdle(); + + // Start playback after the flush, but never return BUFFERING_HAVE_ENOUGH from + // the video renderer (which simulates spool up time for the video renderer). + const base::TimeDelta kStartTime; + EXPECT_CALL(time_source_, SetMediaTime(kStartTime)); + EXPECT_CALL(*audio_renderer_, StartPlaying()) + .WillOnce( + SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH)); + EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); + renderer_impl_->StartPlayingFrom(kStartTime); + + // Nothing else should primed on the message loop. + base::RunLoop().RunUntilIdle(); +} + } // namespace media diff -Nru chromium-browser-43.0.2357.81/net/http/transport_security_state.cc chromium-browser-43.0.2357.130/net/http/transport_security_state.cc --- chromium-browser-43.0.2357.81/net/http/transport_security_state.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/net/http/transport_security_state.cc 2015-06-22 22:56:53.000000000 +0000 @@ -45,6 +45,8 @@ namespace { +#include "net/http/transport_security_state_static.h" + std::string HashesToBase64String(const HashValueVector& hashes) { std::string str; for (size_t i = 0; i != hashes.size(); ++i) { @@ -82,223 +84,13 @@ return true; } -} // namespace - -TransportSecurityState::TransportSecurityState() - : delegate_(NULL), enable_static_pins_(true) { -// Static pinning is only enabled for official builds to make sure that -// others don't end up with pins that cannot be easily updated. -#if !defined(OFFICIAL_BUILD) || defined(OS_ANDROID) || defined(OS_IOS) - enable_static_pins_ = false; -#endif - DCHECK(CalledOnValidThread()); -} - -TransportSecurityState::Iterator::Iterator(const TransportSecurityState& state) - : iterator_(state.enabled_hosts_.begin()), - end_(state.enabled_hosts_.end()) { -} - -TransportSecurityState::Iterator::~Iterator() {} - -bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { - DomainState state; - if (GetStaticDomainState(host, &state)) - return true; - return GetDynamicDomainState(host, &state); -} - -bool TransportSecurityState::ShouldUpgradeToSSL(const std::string& host) { - DomainState dynamic_state; - if (GetDynamicDomainState(host, &dynamic_state)) - return dynamic_state.ShouldUpgradeToSSL(); - - DomainState static_state; - if (GetStaticDomainState(host, &static_state) && - static_state.ShouldUpgradeToSSL()) { - return true; - } - - return false; -} - -bool TransportSecurityState::CheckPublicKeyPins( - const std::string& host, - bool is_issued_by_known_root, - const HashValueVector& public_key_hashes, - std::string* pinning_failure_log) { - // Perform pin validation if, and only if, all these conditions obtain: - // - // * the server's certificate chain chains up to a known root (i.e. not a - // user-installed trust anchor); and - // * the server actually has public key pins. - if (!is_issued_by_known_root || !HasPublicKeyPins(host)) { - return true; - } - - bool pins_are_valid = CheckPublicKeyPinsImpl( - host, public_key_hashes, pinning_failure_log); - if (!pins_are_valid) { - LOG(ERROR) << *pinning_failure_log; - ReportUMAOnPinFailure(host); - } - - UMA_HISTOGRAM_BOOLEAN("Net.PublicKeyPinSuccess", pins_are_valid); - return pins_are_valid; -} - -bool TransportSecurityState::HasPublicKeyPins(const std::string& host) { - DomainState dynamic_state; - if (GetDynamicDomainState(host, &dynamic_state)) - return dynamic_state.HasPublicKeyPins(); - - DomainState static_state; - if (GetStaticDomainState(host, &static_state)) { - if (static_state.HasPublicKeyPins()) - return true; - } - - return false; -} - -void TransportSecurityState::SetDelegate( - TransportSecurityState::Delegate* delegate) { - DCHECK(CalledOnValidThread()); - delegate_ = delegate; -} - -void TransportSecurityState::AddHSTSInternal( - const std::string& host, - TransportSecurityState::DomainState::UpgradeMode upgrade_mode, - const base::Time& expiry, - bool include_subdomains) { - DCHECK(CalledOnValidThread()); - - // Copy-and-modify the existing DomainState for this host (if any). - DomainState domain_state; - const std::string canonicalized_host = CanonicalizeHost(host); - const std::string hashed_host = HashHost(canonicalized_host); - DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); - if (i != enabled_hosts_.end()) - domain_state = i->second; - - domain_state.sts.last_observed = base::Time::Now(); - domain_state.sts.include_subdomains = include_subdomains; - domain_state.sts.expiry = expiry; - domain_state.sts.upgrade_mode = upgrade_mode; - EnableHost(host, domain_state); -} - -void TransportSecurityState::AddHPKPInternal(const std::string& host, - const base::Time& last_observed, - const base::Time& expiry, - bool include_subdomains, - const HashValueVector& hashes) { - DCHECK(CalledOnValidThread()); - - // Copy-and-modify the existing DomainState for this host (if any). - DomainState domain_state; - const std::string canonicalized_host = CanonicalizeHost(host); - const std::string hashed_host = HashHost(canonicalized_host); - DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); - if (i != enabled_hosts_.end()) - domain_state = i->second; - - domain_state.pkp.last_observed = last_observed; - domain_state.pkp.expiry = expiry; - domain_state.pkp.include_subdomains = include_subdomains; - domain_state.pkp.spki_hashes = hashes; - EnableHost(host, domain_state); -} - -void TransportSecurityState::EnableHost(const std::string& host, - const DomainState& state) { - DCHECK(CalledOnValidThread()); - - const std::string canonicalized_host = CanonicalizeHost(host); - if (canonicalized_host.empty()) - return; - - DomainState state_copy(state); - // No need to store this value since it is redundant. (|canonicalized_host| - // is the map key.) - state_copy.sts.domain.clear(); - state_copy.pkp.domain.clear(); - - enabled_hosts_[HashHost(canonicalized_host)] = state_copy; - DirtyNotify(); -} - -bool TransportSecurityState::DeleteDynamicDataForHost(const std::string& host) { - DCHECK(CalledOnValidThread()); - - const std::string canonicalized_host = CanonicalizeHost(host); - if (canonicalized_host.empty()) - return false; - - DomainStateMap::iterator i = enabled_hosts_.find( - HashHost(canonicalized_host)); - if (i != enabled_hosts_.end()) { - enabled_hosts_.erase(i); - DirtyNotify(); - return true; - } - return false; -} - -void TransportSecurityState::ClearDynamicData() { - DCHECK(CalledOnValidThread()); - enabled_hosts_.clear(); -} - -void TransportSecurityState::DeleteAllDynamicDataSince(const base::Time& time) { - DCHECK(CalledOnValidThread()); - - bool dirtied = false; - DomainStateMap::iterator i = enabled_hosts_.begin(); - while (i != enabled_hosts_.end()) { - // Clear STS and PKP state independently. - if (i->second.sts.last_observed >= time) { - dirtied = true; - i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT; - } - if (i->second.pkp.last_observed >= time) { - dirtied = true; - i->second.pkp.spki_hashes.clear(); - i->second.pkp.expiry = base::Time(); - } - - // If both are now invalid, drop the entry altogether. - if (!i->second.ShouldUpgradeToSSL() && !i->second.HasPublicKeyPins()) { - dirtied = true; - enabled_hosts_.erase(i++); - continue; - } - - ++i; - } - - if (dirtied) - DirtyNotify(); -} - -TransportSecurityState::~TransportSecurityState() { - DCHECK(CalledOnValidThread()); -} - -void TransportSecurityState::DirtyNotify() { - DCHECK(CalledOnValidThread()); - - if (delegate_) - delegate_->StateIsDirty(this); -} - -// static -std::string TransportSecurityState::CanonicalizeHost(const std::string& host) { +// Converts |hostname| from dotted form ("www.google.com") to the form +// used in DNS: "\x03www\x06google\x03com", lowercases that, and returns +// the result. +std::string CanonicalizeHost(const std::string& host) { // We cannot perform the operations as detailed in the spec here as |host| // has already undergone IDN processing before it reached us. Thus, we check // that there are no invalid characters in the host and lowercase the result. - std::string new_host; if (!DNSDomainFromDot(host, &new_host)) { // DNSDomainFromDot can fail if any label is > 63 bytes or if the whole @@ -454,8 +246,6 @@ const size_t tree_bytes_; }; -#include "net/http/transport_security_state_static.h" - // PreloadResult is the result of resolving a specific name in the preloaded // data. struct PreloadResult { @@ -495,7 +285,7 @@ // // Dispatch tables are always given in order, but the "end of string" (zero) // value always comes before an entry for '.'. -bool DecodeHSTSPreloadRaw(const std::string& hostname, +bool DecodeHSTSPreloadRaw(const std::string& search_hostname, bool* out_found, PreloadResult* out) { HuffmanDecoder huffman(kHSTSHuffmanTree, sizeof(kHSTSHuffmanTree)); @@ -506,9 +296,30 @@ *out_found = false; + // Ensure that |search_hostname| is a valid hostname before + // processing. + if (CanonicalizeHost(search_hostname).empty()) { + return true; + } + + // Normalize any trailing '.' used for DNS suffix searches. + std::string hostname = search_hostname; + size_t found = hostname.find_last_not_of('.'); + if (found != std::string::npos) { + hostname.erase(found + 1); + } else { + hostname.clear(); + } + + // |hostname| has already undergone IDN conversion, so should be + // entirely A-Labels. The preload data is entirely normalized to + // lower case. + base::StringToLowerASCII(&hostname); + if (hostname.empty()) { return true; } + // hostname_offset contains one more than the index of the current character // in the hostname that is being considered. It's one greater so that we can // represent the position just before the beginning (with zero). @@ -663,6 +474,218 @@ return found; } +} // namespace + +TransportSecurityState::TransportSecurityState() + : delegate_(NULL), enable_static_pins_(true) { +// Static pinning is only enabled for official builds to make sure that +// others don't end up with pins that cannot be easily updated. +#if !defined(OFFICIAL_BUILD) || defined(OS_ANDROID) || defined(OS_IOS) + enable_static_pins_ = false; +#endif + DCHECK(CalledOnValidThread()); +} + +TransportSecurityState::Iterator::Iterator(const TransportSecurityState& state) + : iterator_(state.enabled_hosts_.begin()), + end_(state.enabled_hosts_.end()) { +} + +TransportSecurityState::Iterator::~Iterator() { +} + +bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { + DomainState state; + if (GetStaticDomainState(host, &state)) + return true; + return GetDynamicDomainState(host, &state); +} + +bool TransportSecurityState::ShouldUpgradeToSSL(const std::string& host) { + DomainState dynamic_state; + if (GetDynamicDomainState(host, &dynamic_state)) + return dynamic_state.ShouldUpgradeToSSL(); + + DomainState static_state; + if (GetStaticDomainState(host, &static_state) && + static_state.ShouldUpgradeToSSL()) { + return true; + } + + return false; +} + +bool TransportSecurityState::CheckPublicKeyPins( + const std::string& host, + bool is_issued_by_known_root, + const HashValueVector& public_key_hashes, + std::string* pinning_failure_log) { + // Perform pin validation if, and only if, all these conditions obtain: + // + // * the server's certificate chain chains up to a known root (i.e. not a + // user-installed trust anchor); and + // * the server actually has public key pins. + if (!is_issued_by_known_root || !HasPublicKeyPins(host)) { + return true; + } + + bool pins_are_valid = + CheckPublicKeyPinsImpl(host, public_key_hashes, pinning_failure_log); + if (!pins_are_valid) { + LOG(ERROR) << *pinning_failure_log; + ReportUMAOnPinFailure(host); + } + + UMA_HISTOGRAM_BOOLEAN("Net.PublicKeyPinSuccess", pins_are_valid); + return pins_are_valid; +} + +bool TransportSecurityState::HasPublicKeyPins(const std::string& host) { + DomainState dynamic_state; + if (GetDynamicDomainState(host, &dynamic_state)) + return dynamic_state.HasPublicKeyPins(); + + DomainState static_state; + if (GetStaticDomainState(host, &static_state)) { + if (static_state.HasPublicKeyPins()) + return true; + } + + return false; +} + +void TransportSecurityState::SetDelegate( + TransportSecurityState::Delegate* delegate) { + DCHECK(CalledOnValidThread()); + delegate_ = delegate; +} + +void TransportSecurityState::AddHSTSInternal( + const std::string& host, + TransportSecurityState::DomainState::UpgradeMode upgrade_mode, + const base::Time& expiry, + bool include_subdomains) { + DCHECK(CalledOnValidThread()); + + // Copy-and-modify the existing DomainState for this host (if any). + DomainState domain_state; + const std::string canonicalized_host = CanonicalizeHost(host); + const std::string hashed_host = HashHost(canonicalized_host); + DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); + if (i != enabled_hosts_.end()) + domain_state = i->second; + + domain_state.sts.last_observed = base::Time::Now(); + domain_state.sts.include_subdomains = include_subdomains; + domain_state.sts.expiry = expiry; + domain_state.sts.upgrade_mode = upgrade_mode; + EnableHost(host, domain_state); +} + +void TransportSecurityState::AddHPKPInternal(const std::string& host, + const base::Time& last_observed, + const base::Time& expiry, + bool include_subdomains, + const HashValueVector& hashes) { + DCHECK(CalledOnValidThread()); + + // Copy-and-modify the existing DomainState for this host (if any). + DomainState domain_state; + const std::string canonicalized_host = CanonicalizeHost(host); + const std::string hashed_host = HashHost(canonicalized_host); + DomainStateMap::const_iterator i = enabled_hosts_.find(hashed_host); + if (i != enabled_hosts_.end()) + domain_state = i->second; + + domain_state.pkp.last_observed = last_observed; + domain_state.pkp.expiry = expiry; + domain_state.pkp.include_subdomains = include_subdomains; + domain_state.pkp.spki_hashes = hashes; + EnableHost(host, domain_state); +} + +void TransportSecurityState::EnableHost(const std::string& host, + const DomainState& state) { + DCHECK(CalledOnValidThread()); + + const std::string canonicalized_host = CanonicalizeHost(host); + if (canonicalized_host.empty()) + return; + + DomainState state_copy(state); + // No need to store this value since it is redundant. (|canonicalized_host| + // is the map key.) + state_copy.sts.domain.clear(); + state_copy.pkp.domain.clear(); + + enabled_hosts_[HashHost(canonicalized_host)] = state_copy; + DirtyNotify(); +} + +bool TransportSecurityState::DeleteDynamicDataForHost(const std::string& host) { + DCHECK(CalledOnValidThread()); + + const std::string canonicalized_host = CanonicalizeHost(host); + if (canonicalized_host.empty()) + return false; + + DomainStateMap::iterator i = + enabled_hosts_.find(HashHost(canonicalized_host)); + if (i != enabled_hosts_.end()) { + enabled_hosts_.erase(i); + DirtyNotify(); + return true; + } + return false; +} + +void TransportSecurityState::ClearDynamicData() { + DCHECK(CalledOnValidThread()); + enabled_hosts_.clear(); +} + +void TransportSecurityState::DeleteAllDynamicDataSince(const base::Time& time) { + DCHECK(CalledOnValidThread()); + + bool dirtied = false; + DomainStateMap::iterator i = enabled_hosts_.begin(); + while (i != enabled_hosts_.end()) { + // Clear STS and PKP state independently. + if (i->second.sts.last_observed >= time) { + dirtied = true; + i->second.sts.upgrade_mode = DomainState::MODE_DEFAULT; + } + if (i->second.pkp.last_observed >= time) { + dirtied = true; + i->second.pkp.spki_hashes.clear(); + i->second.pkp.expiry = base::Time(); + } + + // If both are now invalid, drop the entry altogether. + if (!i->second.ShouldUpgradeToSSL() && !i->second.HasPublicKeyPins()) { + dirtied = true; + enabled_hosts_.erase(i++); + continue; + } + + ++i; + } + + if (dirtied) + DirtyNotify(); +} + +TransportSecurityState::~TransportSecurityState() { + DCHECK(CalledOnValidThread()); +} + +void TransportSecurityState::DirtyNotify() { + DCHECK(CalledOnValidThread()); + + if (delegate_) + delegate_->StateIsDirty(this); +} + bool TransportSecurityState::AddHSTSHeader(const std::string& host, const std::string& value) { DCHECK(CalledOnValidThread()); diff -Nru chromium-browser-43.0.2357.81/net/http/transport_security_state.h chromium-browser-43.0.2357.130/net/http/transport_security_state.h --- chromium-browser-43.0.2357.81/net/http/transport_security_state.h 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/net/http/transport_security_state.h 2015-06-22 22:56:53.000000000 +0000 @@ -193,8 +193,7 @@ void ClearDynamicData(); // Inserts |state| into |enabled_hosts_| under the key |hashed_host|. - // |hashed_host| is already in the internal representation - // HashHost(CanonicalizeHost(host)). + // |hashed_host| is already in the internal representation. // Note: This is only used for serializing/deserializing the // TransportSecurityState. void AddOrUpdateEnabledHosts(const std::string& hashed_host, @@ -319,11 +318,6 @@ // The new state for |host| is persisted using the Delegate (if any). void EnableHost(const std::string& host, const DomainState& state); - // Converts |hostname| from dotted form ("www.google.com") to the form - // used in DNS: "\x03www\x06google\x03com", lowercases that, and returns - // the result. - static std::string CanonicalizeHost(const std::string& hostname); - // The set of hosts that have enabled TransportSecurity. |sts.domain| and // |pkp.domain| will always be empty for a DomainState in this map; the domain // comes from the map key instead. diff -Nru chromium-browser-43.0.2357.81/net/http/transport_security_state_unittest.cc chromium-browser-43.0.2357.130/net/http/transport_security_state_unittest.cc --- chromium-browser-43.0.2357.81/net/http/transport_security_state_unittest.cc 2015-05-25 19:17:43.000000000 +0000 +++ chromium-browser-43.0.2357.130/net/http/transport_security_state_unittest.cc 2015-06-22 22:56:53.000000000 +0000 @@ -71,6 +71,64 @@ } }; +TEST_F(TransportSecurityStateTest, DomainNameOddities) { + TransportSecurityState state; + const base::Time current_time(base::Time::Now()); + const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000); + + // DNS suffix search tests. Some DNS resolvers allow a terminal "." to + // indicate not perform DNS suffix searching. Ensure that regardless + // of how this is treated at the resolver layer, or at the URL/origin + // layer (that is, whether they are treated as equivalent or distinct), + // ensure that for policy matching, something lacking a terminal "." + // is equivalent to something with a terminal "." + EXPECT_FALSE(state.ShouldUpgradeToSSL("example.com")); + + state.AddHSTS("example.com", expiry, true /* include_subdomains */); + EXPECT_TRUE(state.ShouldUpgradeToSSL("example.com")); + // Trailing '.' should be equivalent; it's just a resolver hint + EXPECT_TRUE(state.ShouldUpgradeToSSL("example.com.")); + // Leading '.' should be invalid + EXPECT_FALSE(state.ShouldUpgradeToSSL(".example.com")); + // Subdomains should work regardless + EXPECT_TRUE(state.ShouldUpgradeToSSL("sub.example.com")); + EXPECT_TRUE(state.ShouldUpgradeToSSL("sub.example.com.")); + // But invalid subdomains should be rejected + EXPECT_FALSE(state.ShouldUpgradeToSSL("sub..example.com")); + EXPECT_FALSE(state.ShouldUpgradeToSSL("sub..example.com.")); + + // Now try the inverse form + TransportSecurityState state2; + state2.AddHSTS("example.net.", expiry, true /* include_subdomains */); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("example.net.")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("example.net")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("sub.example.net.")); + EXPECT_TRUE(state2.ShouldUpgradeToSSL("sub.example.net")); + + // Finally, test weird things + TransportSecurityState state3; + state3.AddHSTS("", expiry, true /* include_subdomains */); + EXPECT_FALSE(state3.ShouldUpgradeToSSL("")); + EXPECT_FALSE(state3.ShouldUpgradeToSSL(".")); + EXPECT_FALSE(state3.ShouldUpgradeToSSL("...")); + // Make sure it didn't somehow apply HSTS to the world + EXPECT_FALSE(state3.ShouldUpgradeToSSL("example.org")); + + TransportSecurityState state4; + state4.AddHSTS(".", expiry, true /* include_subdomains */); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL(".")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("...")); + EXPECT_FALSE(state4.ShouldUpgradeToSSL("example.org")); + + // Now do the same for preloaded entries + TransportSecurityState state5; + EXPECT_TRUE(state5.ShouldUpgradeToSSL("accounts.google.com")); + EXPECT_TRUE(state5.ShouldUpgradeToSSL("accounts.google.com.")); + EXPECT_FALSE(state5.ShouldUpgradeToSSL("accounts..google.com")); + EXPECT_FALSE(state5.ShouldUpgradeToSSL("accounts..google.com.")); +} + TEST_F(TransportSecurityStateTest, SimpleMatches) { TransportSecurityState state; const base::Time current_time(base::Time::Now()); @@ -123,10 +181,15 @@ const base::Time current_time(base::Time::Now()); const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000); + // Check dynamic entries EXPECT_FALSE(state.ShouldUpgradeToSSL("YAhoo.coM")); bool include_subdomains = false; state.AddHSTS("yahoo.com", expiry, include_subdomains); EXPECT_TRUE(state.ShouldUpgradeToSSL("YAhoo.coM")); + + // Check static entries + EXPECT_TRUE(state.ShouldUpgradeToSSL("AccounTs.GooGle.com")); + EXPECT_TRUE(state.ShouldUpgradeToSSL("mail.google.COM")); } TEST_F(TransportSecurityStateTest, SubdomainMatches) { diff -Nru chromium-browser-43.0.2357.81/testing/xvfb.py chromium-browser-43.0.2357.130/testing/xvfb.py --- chromium-browser-43.0.2357.81/testing/xvfb.py 2015-05-25 19:00:29.000000000 +0000 +++ chromium-browser-43.0.2357.130/testing/xvfb.py 2015-06-22 22:56:53.000000000 +0000 @@ -50,7 +50,7 @@ xvfb_path: Path to Xvfb. """ cmd = [xvfb_path, display, '-screen', '0', '1024x768x24', '-ac', - '-nolisten', 'tcp', '-dpi', '96'] + '-nolisten', 'tcp'] try: proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) diff -Nru chromium-browser-43.0.2357.81/third_party/skia/include/core/SkDevice.h chromium-browser-43.0.2357.130/third_party/skia/include/core/SkDevice.h --- chromium-browser-43.0.2357.81/third_party/skia/include/core/SkDevice.h 2015-05-25 19:17:54.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/skia/include/core/SkDevice.h 2015-06-22 22:57:04.000000000 +0000 @@ -330,15 +330,19 @@ static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkPixelGeometry); // The constructor may change the pixel geometry based on other parameters. - CreateInfo(const SkImageInfo& info, TileUsage tileUsage, SkPixelGeometry geo) + CreateInfo(const SkImageInfo& info, + TileUsage tileUsage, + SkPixelGeometry geo, + bool forImageFilter = false) : fInfo(info) , fTileUsage(tileUsage) , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) - {} + , fForImageFilter(forImageFilter) {} const SkImageInfo fInfo; const TileUsage fTileUsage; const SkPixelGeometry fPixelGeometry; + const bool fForImageFilter; }; /** diff -Nru chromium-browser-43.0.2357.81/third_party/skia/platform_tools/android/bin/adb_wait_for_device chromium-browser-43.0.2357.130/third_party/skia/platform_tools/android/bin/adb_wait_for_device --- chromium-browser-43.0.2357.81/third_party/skia/platform_tools/android/bin/adb_wait_for_device 1970-01-01 00:00:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/skia/platform_tools/android/bin/adb_wait_for_device 2015-06-19 20:20:27.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Wait for the device to be both attached and booted. + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $SCRIPT_DIR/android_setup.sh +source $SCRIPT_DIR/utils/setup_adb.sh + +set -e +set -x + +$ADB $DEVICE_SERIAL wait-for-device + +while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do + sleep 5 +done diff -Nru chromium-browser-43.0.2357.81/third_party/skia/src/core/SkDeviceImageFilterProxy.h chromium-browser-43.0.2357.130/third_party/skia/src/core/SkDeviceImageFilterProxy.h --- chromium-browser-43.0.2357.81/third_party/skia/src/core/SkDeviceImageFilterProxy.h 2015-05-25 19:17:55.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/skia/src/core/SkDeviceImageFilterProxy.h 2015-06-22 22:57:05.000000000 +0000 @@ -22,7 +22,8 @@ SkBaseDevice* createDevice(int w, int h) override { SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h), SkBaseDevice::kPossible_TileUsage, - kUnknown_SkPixelGeometry); + kUnknown_SkPixelGeometry, + true /*forImageFilter*/); return fDevice->onCreateDevice(cinfo, NULL); } bool canHandleImageFilter(const SkImageFilter* filter) override { diff -Nru chromium-browser-43.0.2357.81/third_party/skia/src/pdf/SkPDFDevice.cpp chromium-browser-43.0.2357.130/third_party/skia/src/pdf/SkPDFDevice.cpp --- chromium-browser-43.0.2357.81/third_party/skia/src/pdf/SkPDFDevice.cpp 2015-05-25 19:17:55.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/skia/src/pdf/SkPDFDevice.cpp 2015-06-22 22:57:05.000000000 +0000 @@ -577,7 +577,8 @@ } SkBaseDevice* SkPDFDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint* layerPaint) { - if (layerPaint && not_supported_for_layers(*layerPaint)) { + if (cinfo.fForImageFilter || + (layerPaint && not_supported_for_layers(*layerPaint))) { return SkBitmapDevice::Create(cinfo.fInfo); } SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height()); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/public/web/WebRuntimeFeatures.h chromium-browser-43.0.2357.130/third_party/WebKit/public/web/WebRuntimeFeatures.h --- chromium-browser-43.0.2357.81/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015-05-25 19:18:01.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/public/web/WebRuntimeFeatures.h 2015-06-22 22:57:16.000000000 +0000 @@ -105,6 +105,8 @@ BLINK_EXPORT static void enablePeerConnection(bool); + BLINK_EXPORT static void enablePermissionsAPI(bool); + BLINK_EXPORT static void enableRequestAutocomplete(bool); BLINK_EXPORT static void enableScreenOrientation(bool); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/core/v8/V8Binding.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/core/v8/V8Binding.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/core/v8/V8Binding.h 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/core/v8/V8Binding.h 2015-06-22 22:57:14.000000000 +0000 @@ -191,7 +191,7 @@ } template -inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl) +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl, v8::Local creationContext) { if (UNLIKELY(!impl)) { v8SetReturnValueNull(callbackInfo); @@ -199,11 +199,17 @@ } if (DOMDataStore::setReturnValue(callbackInfo.GetReturnValue(), impl)) return; - v8::Handle wrapper = impl->wrap(callbackInfo.Holder(), callbackInfo.GetIsolate()); + v8::Handle wrapper = impl->wrap(creationContext, callbackInfo.GetIsolate()); v8SetReturnValue(callbackInfo, wrapper); } template +inline void v8SetReturnValue(const CallbackInfo& callbackInfo, ScriptWrappable* impl) +{ + v8SetReturnValue(callbackInfo, impl, callbackInfo.Holder()); +} + +template inline void v8SetReturnValue(const CallbackInfo& callbackInfo, Node* impl) { if (UNLIKELY(!impl)) { diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_attributes.py chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_attributes.py --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_attributes.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_attributes.py 2015-06-22 22:57:14.000000000 +0000 @@ -213,7 +213,7 @@ return 'v8SetReturnValue(info, v8Value)' return idl_type.v8_set_return_value( cpp_value, extended_attributes=extended_attributes, script_wrappable='impl', - release=release, for_main_world=for_main_world) + release=release, for_main_world=for_main_world, is_static=attribute.is_static) context.update({ 'cpp_value': cpp_value, @@ -519,7 +519,7 @@ # These attributes must not be accessors on prototype chains. if (attribute.is_static or - 'Unforgeable' in attribute.extended_attributes or + is_unforgeable(interface, attribute) or 'OverrideBuiltins' in interface.extended_attributes): return False diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_methods.py chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_methods.py --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_methods.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_methods.py 2015-06-22 22:57:14.000000000 +0000 @@ -352,7 +352,7 @@ release = idl_type.release script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else '' - return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world) + return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_wrappable=script_wrappable, release=release, for_main_world=for_main_world, is_static=method.is_static) def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise): diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_types.py chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_types.py --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_types.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_types.py 2015-06-22 22:57:14.000000000 +0000 @@ -795,20 +795,30 @@ 'DOMWrapperForMainWorld': 'v8SetReturnValueForMainWorld(info, WTF::getPtr({cpp_value}))', 'DOMWrapperFast': 'v8SetReturnValueFast(info, WTF::getPtr({cpp_value}), {script_wrappable})', 'DOMWrapperDefault': 'v8SetReturnValue(info, {cpp_value})', + # Note that static attributes and operations do not check whether |this| is + # an instance of the interface nor |this|'s creation context is the same as + # the current context. So we must always use the current context as the + # creation context of the DOM wrapper for the return value. + 'DOMWrapperStatic': 'v8SetReturnValue(info, {cpp_value}, info.GetIsolate()->GetCurrentContext()->Global())', # Generic dictionary type 'Dictionary': 'v8SetReturnValue(info, {cpp_value})', + 'DictionaryStatic': '#error not implemented yet', # Nullable dictionaries 'NullableDictionary': 'v8SetReturnValue(info, result.get())', + 'NullableDictionaryStatic': '#error not implemented yet', # Union types or dictionaries 'DictionaryOrUnion': 'v8SetReturnValue(info, result)', + 'DictionaryOrUnionStatic': '#error not implemented yet', } -def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False): +def v8_set_return_value(idl_type, cpp_value, extended_attributes=None, script_wrappable='', release=False, for_main_world=False, is_static=False): """Returns a statement that converts a C++ value to a V8 value and sets it as a return value. """ def dom_wrapper_conversion_type(): + if is_static: + return 'DOMWrapperStatic' if not script_wrappable: return 'DOMWrapperDefault' if for_main_world: @@ -823,6 +833,8 @@ cpp_value = idl_type.cpp_value_to_v8_value(cpp_value, extended_attributes=extended_attributes) if this_v8_conversion_type == 'DOMWrapper': this_v8_conversion_type = dom_wrapper_conversion_type() + if is_static and this_v8_conversion_type in ('Dictionary', 'NullableDictionary', 'DictionaryOrUnion'): + this_v8_conversion_type += 'Static' format_string = V8_SET_RETURN_VALUE[this_v8_conversion_type] # FIXME: oilpan: Remove .release() once we remove all RefPtrs from generated code. diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_utilities.py chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_utilities.py --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/scripts/v8_utilities.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/scripts/v8_utilities.py 2015-06-22 22:57:14.000000000 +0000 @@ -400,8 +400,9 @@ # [Unforgeable] def is_unforgeable(interface, member): - return ('Unforgeable' in interface.extended_attributes or - 'Unforgeable' in member.extended_attributes) + return (('Unforgeable' in interface.extended_attributes or + 'Unforgeable' in member.extended_attributes) and + not member.is_static) # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking] diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface.idl 2015-06-22 22:57:14.000000000 +0000 @@ -61,6 +61,7 @@ attribute TestEnum testEnumAttribute; attribute DOMStringOrDouble stringOrDoubleAttribute; static attribute DOMString staticStringAttribute; + static attribute TestInterface staticReturnDOMWrapperAttribute; [LegacyInterfaceTypeChecking] attribute TestInterfaceEmpty legacyInterfaceTypeCheckingAttribute; void voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty testInterfaceEmptyArg); @@ -90,6 +91,7 @@ static void alwaysExposedStaticMethod(); [Exposed=Worker] static void workerExposedStaticMethod(); [Exposed=Window] static void windowExposedStaticMethod(); + static TestInterface staticReturnDOMWrapperMethod(); attribute long alwaysExposedAttribute; [Exposed=Worker] attribute long workerExposedAttribute; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp 2015-06-22 22:57:14.000000000 +0000 @@ -363,6 +363,38 @@ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } +static void staticReturnDOMWrapperAttributeAttributeGetter(const v8::PropertyCallbackInfo& info) +{ + v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperAttribute(), info.GetIsolate()->GetCurrentContext()->Global()); +} + +static void staticReturnDOMWrapperAttributeAttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetter(info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + +static void staticReturnDOMWrapperAttributeAttributeSetter(v8::Local v8Value, const v8::PropertyCallbackInfo& info) +{ + v8::Local holder = info.Holder(); + ExceptionState exceptionState(ExceptionState::SetterContext, "staticReturnDOMWrapperAttribute", "TestInterface", holder, info.GetIsolate()); + TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); + if (!cppValue) { + exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); + exceptionState.throwIfNeeded(); + return; + } + TestInterfaceImplementation::setStaticReturnDOMWrapperAttribute(WTF::getPtr(cppValue)); +} + +static void staticReturnDOMWrapperAttributeAttributeSetterCallback(v8::Local, v8::Local v8Value, const v8::PropertyCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetter(v8Value, info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + static void legacyInterfaceTypeCheckingAttributeAttributeGetter(const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); @@ -1312,6 +1344,18 @@ TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } +static void staticReturnDOMWrapperMethodMethod(const v8::FunctionCallbackInfo& info) +{ + v8SetReturnValue(info, TestInterfaceImplementation::staticReturnDOMWrapperMethod(), info.GetIsolate()->GetCurrentContext()->Global()); +} + +static void staticReturnDOMWrapperMethodMethodCallback(const v8::FunctionCallbackInfo& info) +{ + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); + TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethod(info); + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); +} + static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallbackInfo& info) { TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); @@ -2279,6 +2323,10 @@ }; V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local(), v8::None, windowExposedStaticMethodMethodConfiguration); } + const V8DOMConfiguration::MethodConfiguration staticReturnDOMWrapperMethodMethodConfiguration = { + "staticReturnDOMWrapperMethod", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, + }; + V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local(), v8::None, staticReturnDOMWrapperMethodMethodConfiguration); const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMethodMethodConfiguration = { "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, }; @@ -2362,6 +2410,7 @@ }; V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignature, static_cast(v8::DontDelete | v8::DontEnum), toStringMethodConfiguration); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); + functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticReturnDOMWrapperAttribute"), TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsStaticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast(v8::None), v8::Local(), static_cast(v8::DEFAULT)); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp 2015-06-22 22:57:14.000000000 +0000 @@ -30,21 +30,21 @@ namespace TestInterfaceWillBeGarbageCollectedV8Internal { -static void attr1AttributeGetter(const v8::FunctionCallbackInfo& info) +static void attr1AttributeGetter(const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toImpl(holder); v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); } -static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo& info) +static void attr1AttributeGetterCallback(v8::Local, const v8::PropertyCallbackInfo& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } -static void attr1AttributeSetter(v8::Local v8Value, const v8::FunctionCallbackInfo& info) +static void attr1AttributeSetter(v8::Local v8Value, const v8::PropertyCallbackInfo& info) { v8::Local holder = info.Holder(); TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toImpl(holder); @@ -52,9 +52,8 @@ impl->setAttr1(WTF::getPtr(cppValue)); } -static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo& info) +static void attr1AttributeSetterCallback(v8::Local, v8::Local v8Value, const v8::PropertyCallbackInfo& info) { - v8::Local v8Value = info[0]; TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); @@ -101,8 +100,8 @@ } // namespace TestInterfaceWillBeGarbageCollectedV8Internal -static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceWillBeGarbageCollectedAccessors[] = { - {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, 0, static_cast(v8::PROHIBITS_OVERWRITING), static_cast(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts}, +static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGarbageCollectedAttributes[] = { + {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, 0, static_cast(v8::PROHIBITS_OVERWRITING), static_cast(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, }; const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructor::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledProperties, "TestInterfaceWillBeGarbageCollected", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; @@ -174,8 +173,8 @@ v8::Local defaultSignature; defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate(isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, + V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceWillBeGarbageCollectedAttributes), 0, 0, - V8TestInterfaceWillBeGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceWillBeGarbageCollectedAccessors), 0, 0); functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::constructorCallback); functionTemplate->SetLength(1); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/core.gypi chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/core.gypi --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/core.gypi 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/core.gypi 2015-06-22 22:57:14.000000000 +0000 @@ -3807,6 +3807,7 @@ 'loader/MixedContentCheckerTest.cpp', 'page/ContextMenuControllerTest.cpp', 'page/NetworkStateNotifierTest.cpp', + 'page/PagePopupClientTest.cpp', 'page/PrintContextTest.cpp', 'page/scrolling/ScrollStateTest.cpp', 'paint/DisplayItemListPaintTest.cpp', diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/dom/AXObjectCache.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/dom/AXObjectCache.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/dom/AXObjectCache.h 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/dom/AXObjectCache.h 2015-06-22 22:57:14.000000000 +0000 @@ -107,12 +107,9 @@ virtual void handleTextFormControlChanged(Node*) = 0; virtual void handleValueChanged(Node*) = 0; virtual void handleUpdateActiveMenuOption(LayoutMenuList*, int optionIndex) = 0; - virtual void didShowMenuListPopup(LayoutMenuList*) = 0; - virtual void didHideMenuListPopup(LayoutMenuList*) = 0; virtual void handleLoadComplete(Document*) = 0; virtual void handleLayoutComplete(Document*) = 0; - virtual void setCanvasObjectBounds(Element*, const LayoutRect&) = 0; virtual void clearWeakMembers(Visitor*) = 0; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/frame/Location.idl chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/frame/Location.idl --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/frame/Location.idl 2015-05-25 19:01:25.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/frame/Location.idl 2015-06-22 22:57:15.000000000 +0000 @@ -28,6 +28,7 @@ [ CheckSecurity=Frame, + Unforgeable, WillBeGarbageCollected, ] interface Location { // |assign|, |replace|, and *writing* |href| do not require a security @@ -35,11 +36,11 @@ // property of an *existing* document at a different origin. // However, *reading* |href|, or accessing any component, is a security // problem, since that allows tracking navigation. - [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter, Unforgeable] attribute DOMString href; + [SetterCallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity=Setter] attribute DOMString href; - [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable] void assign(DOMString url); - [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity, Unforgeable] void replace(DOMString url); - [CallWith=ActiveWindow, Unforgeable] void reload(); + [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void assign(DOMString url); + [CallWith=(ActiveWindow,FirstWindow), DoNotCheckSecurity] void replace(DOMString url); + [CallWith=ActiveWindow] void reload(); // URI decomposition attributes [SetterCallWith=(ActiveWindow,FirstWindow), RaisesException=Setter] attribute DOMString protocol; @@ -52,8 +53,8 @@ readonly attribute DOMString origin; - [Unforgeable] readonly attribute DOMStringList ancestorOrigins; + readonly attribute DOMStringList ancestorOrigins; - [NotEnumerable, Unforgeable, ImplementedAs=href] DOMString toString(); - [NotEnumerable, CallWith=ThisValue, Unforgeable] any valueOf(); + [NotEnumerable, ImplementedAs=href] DOMString toString(); + [NotEnumerable, CallWith=ThisValue] any valueOf(); }; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp 2015-06-22 22:57:15.000000000 +0000 @@ -363,9 +363,6 @@ IntSize size = pixelSnappedIntRect(frameRect()).size(); HTMLSelectElement* select = selectElement(); m_popup->show(quad, size, select->optionToListIndex(select->selectedIndex())); - if (AXObjectCache* cache = document().existingAXObjectCache()) - cache->didShowMenuListPopup(this); - } void LayoutMenuList::hidePopup() @@ -591,8 +588,6 @@ void LayoutMenuList::popupDidHide() { m_popupIsVisible = false; - if (AXObjectCache* cache = document().existingAXObjectCache()) - cache->didHideMenuListPopup(this); } void LayoutMenuList::popupDidCancel() diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/page/EventHandler.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/page/EventHandler.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/page/EventHandler.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/page/EventHandler.cpp 2015-06-22 22:57:15.000000000 +0000 @@ -1924,13 +1924,11 @@ { ASSERT(exitedNode != enteredNode); - // First, dispatch mouseout and mouseover events (which bubble to ancestors) + // First, dispatch mouseout event (which bubbles to ancestors) if (exitedNode) exitedNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseout, 0, enteredNode); - if (enteredNode) - enteredNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseover, 0, exitedNode); - // Then dispatch mouseenter and mouseleave events. These are non-bubbling events, and they are dispatched if there + // A note on mouseenter and mouseleave: These are non-bubbling events, and they are dispatched if there // is a capturing event handler on an ancestor or a normal event handler on the element itself. This special // handling is necessary to avoid O(n^2) capturing event handler checks. // @@ -1985,6 +1983,10 @@ exitedAncestors[j]->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseleave, 0, enteredNode); } + // Dispatch mouseover event (which bubbles to ancestors) after the mouseleave events are sent. + if (enteredNode) + enteredNode->dispatchMouseEvent(mouseEvent, EventTypeNames::mouseover, 0, exitedNode); + // Determine if there is a capturing mouseenter listener in an ancestor. This must be done /after/ dispatching the // mouseleave events because the handler for mouseleave might set a capturing mouseenter handler. bool enteredNodeHasCapturingAncestor = false; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/page/PagePopupClient.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/page/PagePopupClient.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/core/page/PagePopupClient.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/core/page/PagePopupClient.cpp 2015-06-19 20:20:32.000000000 +0000 @@ -32,6 +32,7 @@ #include "core/page/PagePopupClient.h" #include "wtf/text/StringBuilder.h" +#include "wtf/unicode/CharacterNames.h" namespace blink { @@ -50,6 +51,12 @@ } else if (str[i] == '\\' || str[i] == '"') { builder.append('\\'); builder.append(str[i]); + } else if (str[i] == '<') { + // Need to avoid to add "" because the resultant string is + // typically embedded in \t\f\v\xE2\x80\xA8\xE2\x80\xA9"), buffer.get()); + EXPECT_EQ("\"abc\\r\\n'\\\"\\x3C/script>\\u0009\\u000C\\u000B\\u2028\\u2029\"", std::string(buffer->data(), buffer->size())); +} + +} // namespace blink + diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js chromium-browser-43.0.2357.130/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js 2015-06-22 22:57:15.000000000 +0000 @@ -91,6 +91,14 @@ */ WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback) { + var parsedURL = new WebInspector.ParsedURL(sourceMapURL); + if (parsedURL.isDataURL()) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", sourceMapURL, false); + xhr.send(null); + contentLoaded(xhr.status, {}, xhr.responseText); + return; + } WebInspector.NetworkManager.loadResourceForFrontend(sourceMapURL, null, contentLoaded); /** diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuList.cpp 2015-06-22 22:57:15.000000000 +0000 @@ -63,18 +63,6 @@ return true; } -void AXMenuList::clearChildren() -{ - if (m_children.isEmpty()) - return; - - // There's no reason to clear our AXMenuListPopup child. If we get a - // call to clearChildren, it's because the options might have changed, - // so call it on our popup. - ASSERT(m_children.size() == 1); - m_children[0]->clearChildren(); -} - void AXMenuList::addChildren() { m_haveChildren = true; @@ -133,6 +121,9 @@ void AXMenuList::didUpdateActiveOption(int optionIndex) { + RefPtrWillBeRawPtr document(m_layoutObject->document()); + AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache()); + const auto& childObjects = children(); if (!childObjects.isEmpty()) { ASSERT(childObjects.size() == 1); @@ -144,28 +135,7 @@ } } - axObjectCache()->postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged); -} - -void AXMenuList::didShowPopup() -{ - if (children().size() != 1) - return; - - AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); - popup->didShow(); -} - -void AXMenuList::didHidePopup() -{ - if (children().size() != 1) - return; - - AXMenuListPopup* popup = toAXMenuListPopup(children()[0].get()); - popup->didHide(); - - if (node() && node()->focused()) - axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged); + cache->postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged); } } // namespace blink diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuList.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuList.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuList.h 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuList.h 2015-06-22 22:57:15.000000000 +0000 @@ -40,11 +40,8 @@ virtual bool isCollapsed() const override; virtual AccessibilityExpanded isExpanded() const override final; virtual bool press() const override; - virtual void clearChildren() override; void didUpdateActiveOption(int optionIndex); - void didShowPopup(); - void didHidePopup(); private: AXMenuList(LayoutMenuList*, AXObjectCacheImpl*); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListOption.cpp 2015-06-22 22:57:15.000000000 +0000 @@ -27,7 +27,6 @@ #include "modules/accessibility/AXMenuListOption.h" #include "core/html/HTMLOptionElement.h" -#include "modules/accessibility/AXMenuListPopup.h" #include "modules/accessibility/AXObjectCacheImpl.h" namespace blink { @@ -75,9 +74,6 @@ bool AXMenuListOption::isSelected() const { - AXMenuListPopup* parent = static_cast(parentObject()); - if (parent && !parent->isOffScreen()) - return parent->activeChild() == this; return toHTMLOptionElement(m_element)->selected(); } diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.cpp 2015-06-22 22:57:15.000000000 +0000 @@ -41,7 +41,7 @@ bool AXMenuListPopup::isVisible() const { - return !isOffScreen(); + return false; } bool AXMenuListPopup::isOffScreen() const @@ -80,16 +80,6 @@ return option; } -int AXMenuListPopup::getSelectedIndex() const -{ - Node* parentNode = m_parent->node(); - if (!isHTMLSelectElement(parentNode)) - return -1; - - HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); - return htmlSelectElement->selectedIndex(); -} - bool AXMenuListPopup::press() const { if (!m_parent) @@ -108,10 +98,10 @@ if (!isHTMLSelectElement(parentNode)) return; - HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); m_haveChildren = true; - m_activeIndex = getSelectedIndex(); + HTMLSelectElement* htmlSelectElement = toHTMLSelectElement(parentNode); + m_activeIndex = htmlSelectElement->selectedIndex(); const WillBeHeapVector>& listItems = htmlSelectElement->listItems(); unsigned length = listItems.size(); for (unsigned i = 0; i < length; i++) { @@ -153,7 +143,7 @@ ASSERT_ARG(optionIndex, optionIndex < static_cast(m_children.size())); AXObjectCacheImpl* cache = axObjectCache(); - if (m_activeIndex != optionIndex && m_activeIndex >= 0 && m_activeIndex < static_cast(m_children.size())) { + if (m_activeIndex >= 0 && m_activeIndex < static_cast(m_children.size())) { RefPtr previousChild = m_children[m_activeIndex].get(); cache->postNotification(previousChild.get(), AXObjectCacheImpl::AXMenuListItemUnselected); } @@ -164,34 +154,4 @@ m_activeIndex = optionIndex; } -void AXMenuListPopup::didHide() -{ - AXObjectCacheImpl* cache = axObjectCache(); - cache->postNotification(this, AXObjectCacheImpl::AXHide); - if (activeChild()) - cache->postNotification(activeChild(), AXObjectCacheImpl::AXMenuListItemUnselected); -} - -void AXMenuListPopup::didShow() -{ - if (!m_haveChildren) - addChildren(); - - AXObjectCacheImpl* cache = axObjectCache(); - cache->postNotification(this, AXObjectCacheImpl::AXShow); - int selectedIndex = getSelectedIndex(); - if (selectedIndex >= 0 && selectedIndex < static_cast(m_children.size())) - didUpdateActiveOption(selectedIndex); - else - cache->postNotification(m_parent, AXObjectCacheImpl::AXFocusedUIElementChanged); -} - -AXObject* AXMenuListPopup::activeChild() -{ - if (m_activeIndex < 0 || m_activeIndex >= static_cast(children().size())) - return nullptr; - - return m_children[m_activeIndex].get(); -} - } // namespace blink diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXMenuListPopup.h 2015-06-22 22:57:15.000000000 +0000 @@ -42,9 +42,6 @@ virtual bool isOffScreen() const override; void didUpdateActiveOption(int optionIndex); - void didShow(); - void didHide(); - AXObject* activeChild(); private: explicit AXMenuListPopup(AXObjectCacheImpl*); @@ -61,7 +58,6 @@ virtual bool computeAccessibilityIsIgnored() const override; AXMenuListOption* menuListOptionAXObject(HTMLElement*) const; - int getSelectedIndex() const; // Note that this may be -1 if nothing is selected. int m_activeIndex; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -1038,24 +1038,6 @@ toAXMenuList(obj)->didUpdateActiveOption(optionIndex); } -void AXObjectCacheImpl::didShowMenuListPopup(LayoutMenuList* menuList) -{ - AXObject* obj = get(menuList); - if (!obj || !obj->isMenuList()) - return; - - toAXMenuList(obj)->didShowPopup(); -} - -void AXObjectCacheImpl::didHideMenuListPopup(LayoutMenuList* menuList) -{ - AXObject* obj = get(menuList); - if (!obj || !obj->isMenuList()) - return; - - toAXMenuList(obj)->didHidePopup(); -} - void AXObjectCacheImpl::handleLoadComplete(Document* document) { postNotification(getOrCreate(document), AXObjectCache::AXLoadComplete); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h 2015-05-25 19:18:00.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h 2015-06-22 22:57:16.000000000 +0000 @@ -89,8 +89,6 @@ virtual void handleEditableTextContentChanged(Node*) override; virtual void handleValueChanged(Node*) override; virtual void handleUpdateActiveMenuOption(LayoutMenuList*, int optionIndex) override; - virtual void didShowMenuListPopup(LayoutMenuList*) override; - virtual void didHideMenuListPopup(LayoutMenuList*) override; virtual void handleLoadComplete(Document*) override; virtual void handleLayoutComplete(Document*) override; diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp 2015-05-25 19:18:01.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebArrayBufferConverter.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -35,11 +35,13 @@ namespace blink { -v8::Local WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebArrayBufferConverter::toV8Value(WebArrayBuffer* buffer, v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!buffer) return v8::Local(); - return toV8(PassRefPtr(*buffer), creationContext, isolate); + return toV8(PassRefPtr(*buffer), isolate->GetCurrentContext()->Global(), isolate); } WebArrayBuffer* WebArrayBufferConverter::createFromV8Value(v8::Local value, v8::Isolate* isolate) diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebBlob.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebBlob.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebBlob.cpp 2015-05-25 19:01:26.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebBlob.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -79,11 +79,13 @@ return m_private->uuid(); } -v8::Local WebBlob::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebBlob::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } WebBlob::WebBlob(Blob* blob) diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebDOMError.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebDOMError.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebDOMError.cpp 2015-05-25 19:01:26.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebDOMError.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -67,11 +67,13 @@ return m_private->message(); } -v8::Local WebDOMError::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebDOMError::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } WebDOMError::WebDOMError(DOMError* error) diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebDOMFileSystem.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebDOMFileSystem.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebDOMFileSystem.cpp 2015-05-25 19:01:26.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebDOMFileSystem.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -116,11 +116,13 @@ return m_private->rootURL(); } -v8::Local WebDOMFileSystem::toV8Value(v8::Local creationContext, v8::Isolate* isolate) +v8::Local WebDOMFileSystem::toV8Value(v8::Local /* creationContext */, v8::Isolate* isolate) { + // We no longer use |creationContext| because it's often misused and points + // to a context faked by user script. if (!m_private.get()) return v8::Local(); - return toV8(m_private.get(), creationContext, isolate); + return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); } v8::Local WebDOMFileSystem::createV8Entry( @@ -132,9 +134,9 @@ if (!m_private.get()) return v8::Local(); if (entryType == EntryTypeDirectory) - return toV8(DirectoryEntry::create(m_private.get(), path), creationContext, isolate); + return toV8(DirectoryEntry::create(m_private.get(), path), isolate->GetCurrentContext()->Global(), isolate); ASSERT(entryType == EntryTypeFile); - return toV8(FileEntry::create(m_private.get(), path), creationContext, isolate); + return toV8(FileEntry::create(m_private.get(), path), isolate->GetCurrentContext()->Global(), isolate); } WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015-05-25 19:18:01.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp 2015-06-22 22:57:16.000000000 +0000 @@ -203,6 +203,11 @@ RuntimeEnabledFeatures::setPeerConnectionEnabled(enable); } +void WebRuntimeFeatures::enablePermissionsAPI(bool enable) +{ + RuntimeEnabledFeatures::setPermissionsEnabled(enable); +} + void WebRuntimeFeatures::enableRequestAutocomplete(bool enable) { RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable); diff -Nru chromium-browser-43.0.2357.81/third_party/WebKit/Source/wtf/unicode/CharacterNames.h chromium-browser-43.0.2357.130/third_party/WebKit/Source/wtf/unicode/CharacterNames.h --- chromium-browser-43.0.2357.81/third_party/WebKit/Source/wtf/unicode/CharacterNames.h 2015-05-25 19:18:01.000000000 +0000 +++ chromium-browser-43.0.2357.130/third_party/WebKit/Source/wtf/unicode/CharacterNames.h 2015-06-22 22:57:16.000000000 +0000 @@ -69,12 +69,14 @@ const UChar leftToRightIsolate = 0x2066; const UChar leftToRightMark = 0x200E; const UChar leftToRightOverride = 0x202D; +const UChar lineSeparator = 0x2028; const UChar minusSign = 0x2212; const UChar newlineCharacter = 0x000A; const UChar nationalDigitShapes = 0x206E; const UChar nominalDigitShapes = 0x206F; const UChar noBreakSpace = 0x00A0; const UChar objectReplacementCharacter = 0xFFFC; +const UChar paragraphSeparator = 0x2029; const UChar popDirectionalFormatting = 0x202C; const UChar popDirectionalIsolate = 0x2069; const UChar replacementCharacter = 0xFFFD; @@ -137,12 +139,14 @@ using WTF::Unicode::leftToRightIsolate; using WTF::Unicode::leftToRightMark; using WTF::Unicode::leftToRightOverride; +using WTF::Unicode::lineSeparator; using WTF::Unicode::minusSign; using WTF::Unicode::newlineCharacter; using WTF::Unicode::nationalDigitShapes; using WTF::Unicode::nominalDigitShapes; using WTF::Unicode::noBreakSpace; using WTF::Unicode::objectReplacementCharacter; +using WTF::Unicode::paragraphSeparator; using WTF::Unicode::popDirectionalFormatting; using WTF::Unicode::popDirectionalIsolate; using WTF::Unicode::replacementCharacter; diff -Nru chromium-browser-43.0.2357.81/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js chromium-browser-43.0.2357.130/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js --- chromium-browser-43.0.2357.81/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js 2015-05-25 19:00:31.000000000 +0000 +++ chromium-browser-43.0.2357.130/ui/file_manager/file_manager/foreground/js/ui/share_dialog.js 2015-06-22 22:56:55.000000000 +0000 @@ -145,13 +145,31 @@ * @override */ ShareDialog.prototype.onResized = function(width, height, callback) { - if (width && height) { - this.webViewWrapper_.style.width = width + 'px'; - this.webViewWrapper_.style.height = height + 'px'; - this.webView_.style.width = width + 'px'; - this.webView_.style.height = height + 'px'; - } - setTimeout(callback, 0); + if (!width || !height) + return; + + this.webViewWrapper_.style.width = width + 'px'; + this.webViewWrapper_.style.height = height + 'px'; + this.webView_.style.width = width + 'px'; + this.webView_.style.height = height + 'px'; + + // Wait sending 'resizeComplete' event until the latest size can be obtained + // in the WebView. + var checkSize = function() { + this.webView_.executeScript({ + code: "[document.documentElement.clientWidth," + + " document.documentElement.clientHeight];" + }, function(results) { + if (results[0][0] === parseInt(this.webView_.style.width, 10) && + results[0][1] === parseInt(this.webView_.style.height, 10)) { + callback(); + } else { + setTimeout(checkSize, 50); + } + }.bind(this)); + }.bind(this); + + setTimeout(checkSize, 0); }; /** diff -Nru chromium-browser-43.0.2357.81/v8/include/v8-version.h chromium-browser-43.0.2357.130/v8/include/v8-version.h --- chromium-browser-43.0.2357.81/v8/include/v8-version.h 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/include/v8-version.h 2015-06-22 22:57:07.000000000 +0000 @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 4 #define V8_MINOR_VERSION 3 #define V8_BUILD_NUMBER 61 -#define V8_PATCH_LEVEL 23 +#define V8_PATCH_LEVEL 30 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff -Nru chromium-browser-43.0.2357.81/v8/src/api.cc chromium-browser-43.0.2357.130/v8/src/api.cc --- chromium-browser-43.0.2357.81/v8/src/api.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/api.cc 2015-06-22 22:57:07.000000000 +0000 @@ -369,7 +369,7 @@ i::SnapshotByteSink context_sink; i::PartialSerializer context_ser(internal_isolate, &ser, &context_sink); context_ser.Serialize(&raw_context); - ser.SerializeWeakReferences(); + ser.SerializeWeakReferencesAndDeferred(); result = i::Snapshot::CreateSnapshotBlob(ser, context_ser, metadata); } @@ -4008,10 +4008,10 @@ auto proto = i::PrototypeIterator::GetCurrent(iter); i::LookupIterator it(self, key_obj, i::Handle::cast(proto), i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return MaybeLocal(); Local result; has_pending_exception = !ToLocal(i::Object::GetProperty(&it), &result); RETURN_ON_FAILED_EXECUTION(Value); + if (!it.IsFound()) return MaybeLocal(); RETURN_ESCAPED(result); } @@ -4037,9 +4037,9 @@ auto proto = i::PrototypeIterator::GetCurrent(iter); i::LookupIterator it(self, key_obj, i::Handle::cast(proto), i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return Nothing(); auto result = i::JSReceiver::GetPropertyAttributes(&it); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute); + if (!it.IsFound()) return Nothing(); if (result.FromJust() == ABSENT) { return Just(static_cast(NONE)); } @@ -4057,16 +4057,15 @@ MaybeLocal v8::Object::GetRealNamedProperty(Local context, Local key) { - PREPARE_FOR_EXECUTION( - context, "v8::Object::GetRealNamedPropertyInPrototypeChain()", Value); + PREPARE_FOR_EXECUTION(context, "v8::Object::GetRealNamedProperty()", Value); auto self = Utils::OpenHandle(this); auto key_obj = Utils::OpenHandle(*key); i::LookupIterator it(self, key_obj, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return MaybeLocal(); Local result; has_pending_exception = !ToLocal(i::Object::GetProperty(&it), &result); RETURN_ON_FAILED_EXECUTION(Value); + if (!it.IsFound()) return MaybeLocal(); RETURN_ESCAPED(result); } @@ -4086,9 +4085,9 @@ auto key_obj = Utils::OpenHandle(*key); i::LookupIterator it(self, key_obj, i::LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); - if (!it.IsFound()) return Nothing(); auto result = i::JSReceiver::GetPropertyAttributes(&it); RETURN_ON_FAILED_EXECUTION_PRIMITIVE(PropertyAttribute); + if (!it.IsFound()) return Nothing(); if (result.FromJust() == ABSENT) { return Just(static_cast(NONE)); } diff -Nru chromium-browser-43.0.2357.81/v8/src/arm/full-codegen-arm.cc chromium-browser-43.0.2357.130/v8/src/arm/full-codegen-arm.cc --- chromium-browser-43.0.2357.81/v8/src/arm/full-codegen-arm.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/arm/full-codegen-arm.cc 2015-06-22 22:57:07.000000000 +0000 @@ -1698,21 +1698,13 @@ __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); __ mov(r1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ mov(r0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(r3, r2, r1, r0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1904,17 +1896,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); Handle constant_elements_values( FixedArrayBase::cast(constant_elements->get(1))); @@ -1929,8 +1914,8 @@ __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); __ mov(r1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ mov(r0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(r3, r2, r1, r0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1940,6 +1925,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1956,7 +1943,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ ldr(r6, MemOperand(sp, kPointerSize)); // Copy of array literal. __ ldr(r1, FieldMemOperand(r6, JSObject::kElementsOffset)); diff -Nru chromium-browser-43.0.2357.81/v8/src/arm64/full-codegen-arm64.cc chromium-browser-43.0.2357.130/v8/src/arm64/full-codegen-arm64.cc --- chromium-browser-43.0.2357.81/v8/src/arm64/full-codegen-arm64.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/arm64/full-codegen-arm64.cc 2015-06-22 22:57:07.000000000 +0000 @@ -1677,23 +1677,13 @@ __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset)); __ Mov(x2, Smi::FromInt(expr->literal_index())); __ Mov(x1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ Mov(x0, Smi::FromInt(flags)); - int properties_count = constant_properties->length() / 2; - const int max_cloned_properties = - FastCloneShallowObjectStub::kMaximumClonedProperties; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > max_cloned_properties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(x3, x2, x1, x0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1885,18 +1875,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = (expr->depth() == 1) ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1909,8 +1890,8 @@ __ Ldr(x3, FieldMemOperand(x3, JSFunction::kLiteralsOffset)); __ Mov(x2, Smi::FromInt(expr->literal_index())); __ Mov(x1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ Mov(x0, Smi::FromInt(flags)); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ Mov(x0, Smi::FromInt(expr->ComputeFlags())); __ Push(x3, x2, x1, x0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1920,6 +1901,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1936,7 +1919,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ Peek(x6, kPointerSize); // Copy of array literal. __ Ldr(x1, FieldMemOperand(x6, JSObject::kElementsOffset)); diff -Nru chromium-browser-43.0.2357.81/v8/src/ast.cc chromium-browser-43.0.2357.130/v8/src/ast.cc --- chromium-browser-43.0.2357.81/v8/src/ast.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/ast.cc 2015-06-22 22:57:07.000000000 +0000 @@ -368,6 +368,7 @@ constant_properties_ = constant_properties; fast_elements_ = (max_element_index <= 32) || ((2 * elements) >= max_element_index); + has_elements_ = elements > 0; set_is_simple(is_simple); set_depth(depth_acc); } diff -Nru chromium-browser-43.0.2357.81/v8/src/ast.h chromium-browser-43.0.2357.130/v8/src/ast.h --- chromium-browser-43.0.2357.81/v8/src/ast.h 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/ast.h 2015-06-22 22:57:07.000000000 +0000 @@ -1482,10 +1482,12 @@ Handle constant_properties() const { return constant_properties_; } + int properties_count() const { return constant_properties_->length() / 2; } ZoneList* properties() const { return properties_; } bool fast_elements() const { return fast_elements_; } bool may_store_doubles() const { return may_store_doubles_; } bool has_function() const { return has_function_; } + bool has_elements() const { return has_elements_; } // Decide if a property should be in the object boilerplate. static bool IsBoilerplateProperty(Property* property); @@ -1499,16 +1501,20 @@ void CalculateEmitStore(Zone* zone); // Assemble bitfield of flags for the CreateObjectLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = fast_elements() ? kFastElements : kNoFlags; flags |= has_function() ? kHasFunction : kNoFlags; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } enum Flags { kNoFlags = 0, kFastElements = 1, - kHasFunction = 1 << 1 + kHasFunction = 1 << 1, + kDisableMementos = 1 << 2 }; struct Accessors: public ZoneObject { @@ -1533,6 +1539,7 @@ properties_(properties), boilerplate_properties_(boilerplate_properties), fast_elements_(false), + has_elements_(false), may_store_doubles_(false), has_function_(has_function) {} static int parent_num_ids() { return MaterializedLiteral::num_ids(); } @@ -1543,6 +1550,7 @@ ZoneList* properties_; int boilerplate_properties_; bool fast_elements_; + bool has_elements_; bool may_store_doubles_; bool has_function_; }; @@ -1578,6 +1586,12 @@ DECLARE_NODE_TYPE(ArrayLiteral) Handle constant_elements() const { return constant_elements_; } + ElementsKind constant_elements_kind() const { + DCHECK_EQ(2, constant_elements_->length()); + return static_cast( + Smi::cast(constant_elements_->get(0))->value()); + } + ZoneList* values() const { return values_; } BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); } @@ -1593,9 +1607,11 @@ void BuildConstantElements(Isolate* isolate); // Assemble bitfield of flags for the CreateArrayLiteral helper. - int ComputeFlags() const { + int ComputeFlags(bool disable_mementos = false) const { int flags = depth() == 1 ? kShallowElements : kNoFlags; - flags |= ArrayLiteral::kDisableMementos; + if (disable_mementos) { + flags |= kDisableMementos; + } return flags; } diff -Nru chromium-browser-43.0.2357.81/v8/src/bootstrapper.cc chromium-browser-43.0.2357.130/v8/src/bootstrapper.cc --- chromium-browser-43.0.2357.81/v8/src/bootstrapper.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/bootstrapper.cc 2015-06-22 22:57:07.000000000 +0000 @@ -2766,6 +2766,7 @@ if (value->IsPropertyCell()) { value = handle(PropertyCell::cast(*value)->value(), isolate()); } + if (value->IsTheHole()) continue; PropertyDetails details = properties->DetailsAt(i); DCHECK_EQ(kData, details.kind()); JSObject::AddProperty(to, key, value, details.attributes()); diff -Nru chromium-browser-43.0.2357.81/v8/src/compiler/ast-graph-builder.cc chromium-browser-43.0.2357.130/v8/src/compiler/ast-graph-builder.cc --- chromium-browser-43.0.2357.81/v8/src/compiler/ast-graph-builder.cc 2015-05-25 19:17:57.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/compiler/ast-graph-builder.cc 2015-06-22 22:57:07.000000000 +0000 @@ -1627,7 +1627,7 @@ BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); Node* literal_index = jsgraph()->Constant(expr->literal_index()); Node* constants = jsgraph()->Constant(expr->constant_properties()); - Node* flags = jsgraph()->Constant(expr->ComputeFlags()); + Node* flags = jsgraph()->Constant(expr->ComputeFlags(true)); const Operator* op = javascript()->CallRuntime(Runtime::kCreateObjectLiteral, 4); Node* literal = NewNode(op, literals_array, literal_index, constants, flags); @@ -1819,7 +1819,7 @@ BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); Node* literal_index = jsgraph()->Constant(expr->literal_index()); Node* constants = jsgraph()->Constant(expr->constant_elements()); - Node* flags = jsgraph()->Constant(expr->ComputeFlags()); + Node* flags = jsgraph()->Constant(expr->ComputeFlags(true)); const Operator* op = javascript()->CallRuntime(Runtime::kCreateArrayLiteral, 4); Node* literal = NewNode(op, literals_array, literal_index, constants, flags); diff -Nru chromium-browser-43.0.2357.81/v8/src/flag-definitions.h chromium-browser-43.0.2357.130/v8/src/flag-definitions.h --- chromium-browser-43.0.2357.81/v8/src/flag-definitions.h 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/flag-definitions.h 2015-06-22 22:57:07.000000000 +0000 @@ -844,6 +844,8 @@ DEFINE_BOOL(heap_stats, false, "report heap statistics before and after GC") DEFINE_BOOL(code_stats, false, "report code statistics after GC") DEFINE_BOOL(print_handles, false, "report handles after GC") +DEFINE_BOOL(check_handle_count, false, + "Check that there are not too many handles at GC") DEFINE_BOOL(print_global_handles, false, "report global handles after GC") // TurboFan debug-only flags. diff -Nru chromium-browser-43.0.2357.81/v8/src/full-codegen.cc chromium-browser-43.0.2357.130/v8/src/full-codegen.cc --- chromium-browser-43.0.2357.81/v8/src/full-codegen.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/full-codegen.cc 2015-06-22 22:57:07.000000000 +0000 @@ -415,6 +415,27 @@ } +bool FullCodeGenerator::MustCreateObjectLiteralWithRuntime( + ObjectLiteral* expr) const { + // FastCloneShallowObjectStub doesn't copy elements, and object literals don't + // support copy-on-write (COW) elements for now. + // TODO(mvstanton): make object literals support COW elements. + return expr->may_store_doubles() || expr->depth() > 1 || + masm()->serializer_enabled() || + expr->ComputeFlags() != ObjectLiteral::kFastElements || + expr->has_elements() || + expr->properties_count() > + FastCloneShallowObjectStub::kMaximumClonedProperties; +} + + +bool FullCodeGenerator::MustCreateArrayLiteralWithRuntime( + ArrayLiteral* expr) const { + return expr->depth() > 1 || + expr->values()->length() > JSObject::kInitialMaxFastElementArray; +} + + void FullCodeGenerator::Initialize() { InitializeAstVisitor(info_->isolate(), info_->zone()); // The generation of debug code must match between the snapshot code and the diff -Nru chromium-browser-43.0.2357.81/v8/src/full-codegen.h chromium-browser-43.0.2357.130/v8/src/full-codegen.h --- chromium-browser-43.0.2357.81/v8/src/full-codegen.h 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/full-codegen.h 2015-06-22 22:57:07.000000000 +0000 @@ -715,7 +715,7 @@ loop_depth_--; } - MacroAssembler* masm() { return masm_; } + MacroAssembler* masm() const { return masm_; } class ExpressionContext; const ExpressionContext* context() { return context_; } @@ -759,6 +759,9 @@ void PopulateDeoptimizationData(Handle code); void PopulateTypeFeedbackInfo(Handle code); + bool MustCreateObjectLiteralWithRuntime(ObjectLiteral* expr) const; + bool MustCreateArrayLiteralWithRuntime(ArrayLiteral* expr) const; + Handle handler_table() { return handler_table_; } struct BailoutEntry { diff -Nru chromium-browser-43.0.2357.81/v8/src/heap/heap.cc chromium-browser-43.0.2357.130/v8/src/heap/heap.cc --- chromium-browser-43.0.2357.81/v8/src/heap/heap.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/heap/heap.cc 2015-06-22 22:57:07.000000000 +0000 @@ -620,6 +620,7 @@ if (FLAG_gc_verbose) Print(); if (FLAG_code_stats) ReportCodeStatistics("After GC"); #endif + if (FLAG_check_handle_count) CheckHandleCount(); if (FLAG_deopt_every_n_garbage_collections > 0) { // TODO(jkummerow/ulan/jarin): This is not safe! We can't assume that // the topmost optimized frame can be deoptimized safely, because it @@ -1023,7 +1024,7 @@ } else { if (counter > 1) { CollectAllGarbage( - kReduceMemoryFootprintMask, + kReduceMemoryFootprintMask | kAbortIncrementalMarkingMask, "failed to reserve space in paged or large " "object space, trying to reduce memory footprint"); } else { @@ -5698,6 +5699,24 @@ #endif +class CheckHandleCountVisitor : public ObjectVisitor { + public: + CheckHandleCountVisitor() : handle_count_(0) {} + ~CheckHandleCountVisitor() { CHECK(handle_count_ < 2000); } + void VisitPointers(Object** start, Object** end) { + handle_count_ += end - start; + } + + private: + ptrdiff_t handle_count_; +}; + + +void Heap::CheckHandleCount() { + CheckHandleCountVisitor v; + isolate_->handle_scope_implementer()->Iterate(&v); +} + Space* AllSpaces::next() { switch (counter_++) { diff -Nru chromium-browser-43.0.2357.81/v8/src/heap/heap.h chromium-browser-43.0.2357.130/v8/src/heap/heap.h --- chromium-browser-43.0.2357.81/v8/src/heap/heap.h 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/heap/heap.h 2015-06-22 22:57:07.000000000 +0000 @@ -987,6 +987,7 @@ } static bool RootIsImmortalImmovable(int root_index); + void CheckHandleCount(); #ifdef VERIFY_HEAP // Verify the heap is in its normal state before or after a GC. diff -Nru chromium-browser-43.0.2357.81/v8/src/hydrogen.cc chromium-browser-43.0.2357.130/v8/src/hydrogen.cc --- chromium-browser-43.0.2357.81/v8/src/hydrogen.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/hydrogen.cc 2015-06-22 22:57:07.000000000 +0000 @@ -5554,19 +5554,13 @@ Handle closure_literals(closure->literals(), isolate()); Handle constant_properties = expr->constant_properties(); int literal_index = expr->literal_index(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(true); Add(Add(closure_literals), Add(literal_index), Add(constant_properties), Add(flags)); - // TODO(mvstanton): Add a flag to turn off creation of any - // AllocationMementos for this call: we are in crankshaft and should have - // learned enough about transition behavior to stop emitting mementos. Runtime::FunctionId function_id = Runtime::kCreateObjectLiteral; literal = Add(isolate()->factory()->empty_string(), Runtime::FunctionForId(function_id), @@ -5725,10 +5719,7 @@ // pass an empty fixed array to the runtime function instead. Handle constants = isolate()->factory()->empty_fixed_array(); int literal_index = expr->literal_index(); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - flags |= ArrayLiteral::kDisableMementos; + int flags = expr->ComputeFlags(true); Add(Add(literals), Add(literal_index), diff -Nru chromium-browser-43.0.2357.81/v8/src/ia32/full-codegen-ia32.cc chromium-browser-43.0.2357.130/v8/src/ia32/full-codegen-ia32.cc --- chromium-browser-43.0.2357.81/v8/src/ia32/full-codegen-ia32.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/ia32/full-codegen-ia32.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1622,17 +1622,10 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || - flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + // If any of the keys would store to the elements array, then we shouldn't + // allow it. + if (MustCreateObjectLiteralWithRuntime(expr)) { __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); @@ -1645,7 +1638,7 @@ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_properties)); __ mov(edx, Immediate(Smi::FromInt(flags))); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1824,20 +1817,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1846,12 +1828,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_elements)); - __ push(Immediate(Smi::FromInt(flags))); + __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1864,6 +1846,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1880,7 +1864,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru chromium-browser-43.0.2357.81/v8/src/json-parser.h chromium-browser-43.0.2357.130/v8/src/json-parser.h --- chromium-browser-43.0.2357.81/v8/src/json-parser.h 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/json-parser.h 2015-06-22 22:57:08.000000000 +0000 @@ -16,6 +16,9 @@ namespace v8 { namespace internal { +enum ParseElementResult { kElementFound, kElementNotFound, kNullHandle }; + + // A simple json parser. template class JsonParser BASE_EMBEDDED { @@ -155,6 +158,10 @@ // JavaScript array. Handle ParseJsonObject(); + // Helper for ParseJsonObject. Parses the form "123": obj, which is recorded + // as an element, not a property. + ParseElementResult ParseElement(Handle json_object); + // Parses a JSON array literal (grammar production JSONArray). An array // literal is a square-bracketed and comma separated sequence (possibly empty) // of JSON values. @@ -299,6 +306,41 @@ } +template +ParseElementResult JsonParser::ParseElement( + Handle json_object) { + uint32_t index = 0; + // Maybe an array index, try to parse it. + if (c0_ == '0') { + // With a leading zero, the string has to be "0" only to be an index. + Advance(); + } else { + do { + int d = c0_ - '0'; + if (index > 429496729U - ((d > 5) ? 1 : 0)) break; + index = (index * 10) + d; + Advance(); + } while (IsDecimalDigit(c0_)); + } + + if (c0_ == '"') { + // Successfully parsed index, parse and store element. + AdvanceSkipWhitespace(); + + if (c0_ == ':') { + AdvanceSkipWhitespace(); + Handle value = ParseJsonValue(); + if (!value.is_null()) { + JSObject::SetOwnElement(json_object, index, value, SLOPPY).Assert(); + return kElementFound; + } else { + return kNullHandle; + } + } + } + return kElementNotFound; +} + // Parse a JSON object. Position must be right at '{'. template Handle JsonParser::ParseJsonObject() { @@ -320,35 +362,12 @@ int start_position = position_; Advance(); - uint32_t index = 0; if (IsDecimalDigit(c0_)) { - // Maybe an array index, try to parse it. - if (c0_ == '0') { - // With a leading zero, the string has to be "0" only to be an index. - Advance(); - } else { - do { - int d = c0_ - '0'; - if (index > 429496729U - ((d > 5) ? 1 : 0)) break; - index = (index * 10) + d; - Advance(); - } while (IsDecimalDigit(c0_)); - } - - if (c0_ == '"') { - // Successfully parsed index, parse and store element. - AdvanceSkipWhitespace(); - - if (c0_ != ':') return ReportUnexpectedCharacter(); - AdvanceSkipWhitespace(); - Handle value = ParseJsonValue(); - if (value.is_null()) return ReportUnexpectedCharacter(); - - JSObject::SetOwnElement(json_object, index, value, SLOPPY).Assert(); - continue; - } - // Not an index, fallback to the slow path. + ParseElementResult element_result = ParseElement(json_object); + if (element_result == kNullHandle) return Handle::null(); + if (element_result == kElementFound) continue; } + // Not an index, fallback to the slow path. position_ = start_position; #ifdef DEBUG @@ -360,81 +379,109 @@ // Try to follow existing transitions as long as possible. Once we stop // transitioning, no transition can be found anymore. + DCHECK(transitioning); + // First check whether there is a single expected transition. If so, try + // to parse it first. + bool follow_expected = false; + Handle target; + if (seq_one_byte) { + key = TransitionArray::ExpectedTransitionKey(map); + follow_expected = !key.is_null() && ParseJsonString(key); + } + // If the expected transition hits, follow it. + if (follow_expected) { + target = TransitionArray::ExpectedTransitionTarget(map); + } else { + // If the expected transition failed, parse an internalized string and + // try to find a matching transition. + key = ParseJsonInternalizedString(); + if (key.is_null()) return ReportUnexpectedCharacter(); + + target = TransitionArray::FindTransitionToField(map, key); + // If a transition was found, follow it and continue. + transitioning = !target.is_null(); + } + if (c0_ != ':') return ReportUnexpectedCharacter(); + + AdvanceSkipWhitespace(); + value = ParseJsonValue(); + if (value.is_null()) return ReportUnexpectedCharacter(); + if (transitioning) { - // First check whether there is a single expected transition. If so, try - // to parse it first. - bool follow_expected = false; - Handle target; - if (seq_one_byte) { - key = TransitionArray::ExpectedTransitionKey(map); - follow_expected = !key.is_null() && ParseJsonString(key); - } - // If the expected transition hits, follow it. - if (follow_expected) { - target = TransitionArray::ExpectedTransitionTarget(map); + PropertyDetails details = + target->instance_descriptors()->GetDetails(descriptor); + Representation expected_representation = details.representation(); + + if (value->FitsRepresentation(expected_representation)) { + if (expected_representation.IsHeapObject() && + !target->instance_descriptors() + ->GetFieldType(descriptor) + ->NowContains(value)) { + Handle value_type( + value->OptimalType(isolate(), expected_representation)); + Map::GeneralizeFieldType(target, descriptor, + expected_representation, value_type); + } + DCHECK(target->instance_descriptors() + ->GetFieldType(descriptor) + ->NowContains(value)); + properties.Add(value, zone()); + map = target; + descriptor++; + continue; } else { - // If the expected transition failed, parse an internalized string and - // try to find a matching transition. - key = ParseJsonInternalizedString(); - if (key.is_null()) return ReportUnexpectedCharacter(); - - target = TransitionArray::FindTransitionToField(map, key); - // If a transition was found, follow it and continue. - transitioning = !target.is_null(); + transitioning = false; } - if (c0_ != ':') return ReportUnexpectedCharacter(); + } - AdvanceSkipWhitespace(); - value = ParseJsonValue(); - if (value.is_null()) return ReportUnexpectedCharacter(); + DCHECK(!transitioning); - if (transitioning) { - PropertyDetails details = - target->instance_descriptors()->GetDetails(descriptor); - Representation expected_representation = details.representation(); - - if (value->FitsRepresentation(expected_representation)) { - if (expected_representation.IsHeapObject() && - !target->instance_descriptors() - ->GetFieldType(descriptor) - ->NowContains(value)) { - Handle value_type(value->OptimalType( - isolate(), expected_representation)); - Map::GeneralizeFieldType(target, descriptor, - expected_representation, value_type); - } - DCHECK(target->instance_descriptors()->GetFieldType( - descriptor)->NowContains(value)); - properties.Add(value, zone()); - map = target; - descriptor++; - continue; - } else { - transitioning = false; - } + // Commit the intermediate state to the object and stop transitioning. + CommitStateToJsonObject(json_object, map, &properties); + + Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); + } while (transitioning && MatchSkipWhiteSpace(',')); + + // If we transitioned until the very end, transition the map now. + if (transitioning) { + CommitStateToJsonObject(json_object, map, &properties); + } else { + while (MatchSkipWhiteSpace(',')) { + HandleScope local_scope(isolate()); + if (c0_ != '"') return ReportUnexpectedCharacter(); + + int start_position = position_; + Advance(); + + if (IsDecimalDigit(c0_)) { + ParseElementResult element_result = ParseElement(json_object); + if (element_result == kNullHandle) return Handle::null(); + if (element_result == kElementFound) continue; } + // Not an index, fallback to the slow path. + + position_ = start_position; +#ifdef DEBUG + c0_ = '"'; +#endif + + Handle key; + Handle value; - // Commit the intermediate state to the object and stop transitioning. - CommitStateToJsonObject(json_object, map, &properties); - } else { key = ParseJsonInternalizedString(); if (key.is_null() || c0_ != ':') return ReportUnexpectedCharacter(); AdvanceSkipWhitespace(); value = ParseJsonValue(); if (value.is_null()) return ReportUnexpectedCharacter(); + + Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); } + } - Runtime::DefineObjectProperty(json_object, key, value, NONE).Check(); - } while (MatchSkipWhiteSpace(',')); if (c0_ != '}') { return ReportUnexpectedCharacter(); } - - // If we transitioned until the very end, transition the map now. - if (transitioning) { - CommitStateToJsonObject(json_object, map, &properties); - } } AdvanceSkipWhitespace(); return scope.CloseAndEscape(json_object); diff -Nru chromium-browser-43.0.2357.81/v8/src/mips/full-codegen-mips.cc chromium-browser-43.0.2357.130/v8/src/mips/full-codegen-mips.cc --- chromium-browser-43.0.2357.81/v8/src/mips/full-codegen-mips.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/mips/full-codegen-mips.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1684,21 +1684,12 @@ __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - __ li(a0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1890,21 +1881,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1918,8 +1898,8 @@ __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ li(a0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1929,6 +1909,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1946,7 +1928,7 @@ VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ lw(t2, MemOperand(sp, kPointerSize)); // Copy of array literal. __ lw(a1, FieldMemOperand(t2, JSObject::kElementsOffset)); diff -Nru chromium-browser-43.0.2357.81/v8/src/mips64/full-codegen-mips64.cc chromium-browser-43.0.2357.130/v8/src/mips64/full-codegen-mips64.cc --- chromium-browser-43.0.2357.81/v8/src/mips64/full-codegen-mips64.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/mips64/full-codegen-mips64.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1682,21 +1682,12 @@ __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_properties)); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - __ li(a0, Operand(Smi::FromInt(flags))); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1888,21 +1879,10 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1916,8 +1896,8 @@ __ ld(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); __ li(a1, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ li(a0, Operand(Smi::FromInt(flags))); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); __ Push(a3, a2, a1, a0); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1927,6 +1907,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1944,7 +1926,7 @@ VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ ld(a6, MemOperand(sp, kPointerSize)); // Copy of array literal. __ ld(a1, FieldMemOperand(a6, JSObject::kElementsOffset)); diff -Nru chromium-browser-43.0.2357.81/v8/src/objects.cc chromium-browser-43.0.2357.130/v8/src/objects.cc --- chromium-browser-43.0.2357.81/v8/src/objects.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/objects.cc 2015-06-22 22:57:08.000000000 +0000 @@ -2504,7 +2504,7 @@ ElementsKind from_kind = root_map->elements_kind(); ElementsKind to_kind = old_map->elements_kind(); - if (from_kind != to_kind && + if (from_kind != to_kind && to_kind != DICTIONARY_ELEMENTS && !(IsTransitionableFastElementsKind(from_kind) && IsMoreGeneralElementsKindTransition(from_kind, to_kind))) { return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode, @@ -2968,6 +2968,15 @@ // Check the state of the root map. Map* root_map = old_map->FindRootMap(); if (!old_map->EquivalentToForTransition(root_map)) return MaybeHandle(); + + ElementsKind from_kind = root_map->elements_kind(); + ElementsKind to_kind = old_map->elements_kind(); + if (from_kind != to_kind) { + // Try to follow existing elements kind transitions. + root_map = root_map->LookupElementsTransitionMap(to_kind); + if (root_map == NULL) return MaybeHandle(); + // From here on, use the map with correct elements kind as root map. + } int root_nof = root_map->NumberOfOwnDescriptors(); int old_nof = old_map->NumberOfOwnDescriptors(); diff -Nru chromium-browser-43.0.2357.81/v8/src/ppc/full-codegen-ppc.cc chromium-browser-43.0.2357.130/v8/src/ppc/full-codegen-ppc.cc --- chromium-browser-43.0.2357.81/v8/src/ppc/full-codegen-ppc.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/ppc/full-codegen-ppc.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1651,19 +1651,13 @@ __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset)); __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); __ mov(r4, Operand(constant_properties)); - int flags = expr->fast_elements() ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; + int flags = expr->ComputeFlags(); __ LoadSmiLiteral(r3, Smi::FromInt(flags)); - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + if (MustCreateObjectLiteralWithRuntime(expr)) { __ Push(r6, r5, r4, r3); __ CallRuntime(Runtime::kCreateObjectLiteral, 4); } else { - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1853,16 +1847,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); - bool has_fast_elements = IsFastObjectElementsKind(constant_elements_kind); + bool has_fast_elements = + IsFastObjectElementsKind(expr->constant_elements_kind()); Handle constant_elements_values( FixedArrayBase::cast(constant_elements->get(1))); @@ -1877,8 +1864,8 @@ __ LoadP(r6, FieldMemOperand(r6, JSFunction::kLiteralsOffset)); __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); __ mov(r4, Operand(constant_elements)); - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { - __ LoadSmiLiteral(r3, Smi::FromInt(flags)); + if (MustCreateArrayLiteralWithRuntime(expr)) { + __ LoadSmiLiteral(r3, Smi::FromInt(expr->ComputeFlags())); __ Push(r6, r5, r4, r3); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { @@ -1888,6 +1875,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1904,7 +1893,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_fast_elements) { int offset = FixedArray::kHeaderSize + (i * kPointerSize); __ LoadP(r8, MemOperand(sp, kPointerSize)); // Copy of array literal. __ LoadP(r4, FieldMemOperand(r8, JSObject::kElementsOffset)); diff -Nru chromium-browser-43.0.2357.81/v8/src/runtime/runtime-literals.cc chromium-browser-43.0.2357.130/v8/src/runtime/runtime-literals.cc --- chromium-browser-43.0.2357.81/v8/src/runtime/runtime-literals.cc 2015-05-25 19:17:58.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/runtime/runtime-literals.cc 2015-06-22 22:57:08.000000000 +0000 @@ -237,6 +237,7 @@ CONVERT_SMI_ARG_CHECKED(flags, 3); bool should_have_fast_elements = (flags & ObjectLiteral::kFastElements) != 0; bool has_function_literal = (flags & ObjectLiteral::kHasFunction) != 0; + bool enable_mementos = (flags & ObjectLiteral::kDisableMementos) == 0; RUNTIME_ASSERT(literals_index >= 0 && literals_index < literals->length()); @@ -267,7 +268,7 @@ Handle(JSObject::cast(site->transition_info()), isolate); } - AllocationSiteUsageContext usage_context(isolate, site, true); + AllocationSiteUsageContext usage_context(isolate, site, enable_mementos); usage_context.EnterNewScope(); MaybeHandle maybe_copy = JSObject::DeepCopy(boilerplate, &usage_context); diff -Nru chromium-browser-43.0.2357.81/v8/src/snapshot/serialize.cc chromium-browser-43.0.2357.130/v8/src/snapshot/serialize.cc --- chromium-browser-43.0.2357.81/v8/src/snapshot/serialize.cc 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/snapshot/serialize.cc 2015-06-22 22:57:08.000000000 +0000 @@ -569,6 +569,7 @@ isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); isolate_->heap()->RepairFreeListsAfterDeserialization(); isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); + DeserializeDeferredObjects(); isolate_->heap()->set_native_contexts_list( isolate_->heap()->undefined_value()); @@ -622,6 +623,7 @@ Object* outdated_contexts; VisitPointer(&root); VisitPointer(&outdated_contexts); + DeserializeDeferredObjects(); // There's no code deserialized here. If this assert fires // then that's changed and logging should be added to notify @@ -644,6 +646,7 @@ DisallowHeapAllocation no_gc; Object* root; VisitPointer(&root); + DeserializeDeferredObjects(); return Handle(SharedFunctionInfo::cast(root)); } } @@ -665,13 +668,22 @@ } -void Deserializer::RelinkAllocationSite(AllocationSite* site) { - if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { - site->set_weak_next(isolate_->heap()->undefined_value()); - } else { - site->set_weak_next(isolate_->heap()->allocation_sites_list()); +void Deserializer::DeserializeDeferredObjects() { + for (int code = source_.Get(); code != kSynchronize; code = source_.Get()) { + int space = code & kSpaceMask; + DCHECK(space <= kNumberOfSpaces); + DCHECK(code - space == kNewObject); + HeapObject* object = GetBackReferencedObject(space); + int size = source_.GetInt() << kPointerSizeLog2; + Address obj_address = object->address(); + Object** start = reinterpret_cast(obj_address + kPointerSize); + Object** end = reinterpret_cast(obj_address + size); + bool filled = ReadData(start, end, space, obj_address); + CHECK(filled); + if (object->IsAllocationSite()) { + RelinkAllocationSite(AllocationSite::cast(object)); + } } - isolate_->heap()->set_allocation_sites_list(site); } @@ -707,7 +719,8 @@ }; -HeapObject* Deserializer::ProcessNewObjectFromSerializedCode(HeapObject* obj) { +HeapObject* Deserializer::PostProcessNewObject(HeapObject* obj) { + DCHECK(deserializing_user_code()); if (obj->IsString()) { String* string = String::cast(obj); // Uninitialize hash field as the hash seed may have changed. @@ -722,11 +735,30 @@ } } else if (obj->IsScript()) { Script::cast(obj)->set_id(isolate_->heap()->NextScriptId()); + } else { + DCHECK(CanBeDeferred(obj)); } return obj; } +void Deserializer::RelinkAllocationSite(AllocationSite* obj) { + DCHECK(obj->IsAllocationSite()); + // Allocation sites are present in the snapshot, and must be linked into + // a list at deserialization time. + AllocationSite* site = AllocationSite::cast(obj); + // TODO(mvstanton): consider treating the heap()->allocation_sites_list() + // as a (weak) root. If this root is relocated correctly, + // RelinkAllocationSite() isn't necessary. + if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { + site->set_weak_next(isolate_->heap()->undefined_value()); + } else { + site->set_weak_next(isolate_->heap()->allocation_sites_list()); + } + isolate_->heap()->set_allocation_sites_list(site); +} + + HeapObject* Deserializer::GetBackReferencedObject(int space) { HeapObject* obj; BackReference back_reference(source_.GetInt()); @@ -782,24 +814,21 @@ if (FLAG_log_snapshot_positions) { LOG(isolate_, SnapshotPositionEvent(address, source_.position())); } - ReadData(current, limit, space_number, address); - // TODO(mvstanton): consider treating the heap()->allocation_sites_list() - // as a (weak) root. If this root is relocated correctly, - // RelinkAllocationSite() isn't necessary. - if (obj->IsAllocationSite()) RelinkAllocationSite(AllocationSite::cast(obj)); + if (ReadData(current, limit, space_number, address)) { + // Only post process if object content has not been deferred. + if (obj->IsAllocationSite()) { + RelinkAllocationSite(AllocationSite::cast(obj)); + } - // Fix up strings from serialized user code. - if (deserializing_user_code()) obj = ProcessNewObjectFromSerializedCode(obj); + if (deserializing_user_code()) obj = PostProcessNewObject(obj); + } Object* write_back_obj = obj; UnalignedCopy(write_back, &write_back_obj); #ifdef DEBUG if (obj->IsCode()) { DCHECK(space_number == CODE_SPACE || space_number == LO_SPACE); -#ifdef VERIFY_HEAP - obj->ObjectVerify(); -#endif // VERIFY_HEAP } else { DCHECK(space_number != CODE_SPACE); } @@ -843,7 +872,7 @@ } -void Deserializer::ReadData(Object** current, Object** limit, int source_space, +bool Deserializer::ReadData(Object** current, Object** limit, int source_space, Address current_object_address) { Isolate* const isolate = isolate_; // Write barrier support costs around 1% in startup time. In fact there @@ -1103,6 +1132,18 @@ break; } + case kDeferred: { + // Deferred can only occur right after the heap object header. + DCHECK(current == reinterpret_cast(current_object_address + + kPointerSize)); + HeapObject* obj = HeapObject::FromAddress(current_object_address); + // If the deferred object is a map, its instance type may be used + // during deserialization. Initialize it with a temporary value. + if (obj->IsMap()) Map::cast(obj)->set_instance_type(FILLER_TYPE); + current = limit; + return false; + } + case kSynchronize: // If we get here then that indicates that you have a mismatch between // the number of GC roots when serializing and deserializing. @@ -1209,6 +1250,7 @@ } } CHECK_EQ(limit, current); + return true; } @@ -1217,6 +1259,7 @@ sink_(sink), external_reference_encoder_(isolate), root_index_map_(isolate), + recursion_depth_(0), code_address_map_(NULL), large_objects_total_size_(0), seen_large_objects_index_(0) { @@ -1235,6 +1278,16 @@ } +void Serializer::SerializeDeferredObjects() { + while (deferred_objects_.length() > 0) { + HeapObject* obj = deferred_objects_.RemoveLast(); + ObjectSerializer obj_serializer(this, obj, sink_, kPlain, kStartOfObject); + obj_serializer.SerializeDeferred(); + } + sink_->Put(kSynchronize, "Finished with deferred objects"); +} + + void StartupSerializer::SerializeStrongReferences() { Isolate* isolate = this->isolate(); // No active threads. @@ -1279,6 +1332,7 @@ } VisitPointer(o); SerializeOutdatedContextsAsFixedArray(); + SerializeDeferredObjects(); Pad(); } @@ -1302,10 +1356,10 @@ sink_->Put(reinterpret_cast(&length_smi)[i], "Byte"); } for (int i = 0; i < length; i++) { - BackReference back_ref = outdated_contexts_[i]; - DCHECK(BackReferenceIsAlreadyAllocated(back_ref)); - sink_->Put(kBackref + back_ref.space(), "BackRef"); - sink_->PutInt(back_ref.reference(), "BackRefValue"); + Context* context = outdated_contexts_[i]; + BackReference back_reference = back_reference_map_.Lookup(context); + sink_->Put(kBackref + back_reference.space(), "BackRef"); + PutBackReference(context, back_reference); } } } @@ -1468,10 +1522,7 @@ "BackRefWithSkip"); sink_->PutInt(skip, "BackRefSkipDistance"); } - DCHECK(BackReferenceIsAlreadyAllocated(back_reference)); - sink_->PutInt(back_reference.reference(), "BackRefValue"); - - hot_objects_.Add(obj); + PutBackReference(obj, back_reference); } return true; } @@ -1507,7 +1558,7 @@ } -void StartupSerializer::SerializeWeakReferences() { +void StartupSerializer::SerializeWeakReferencesAndDeferred() { // This phase comes right after the serialization (of the snapshot). // After we have done the partial serialization the partial snapshot cache // will contain some references needed to decode the partial snapshot. We @@ -1516,6 +1567,7 @@ Object* undefined = isolate()->heap()->undefined_value(); VisitPointer(&undefined); isolate()->heap()->IterateWeakRoots(this, VISIT_ALL); + SerializeDeferredObjects(); Pad(); } @@ -1548,6 +1600,13 @@ } +void Serializer::PutBackReference(HeapObject* object, BackReference reference) { + DCHECK(BackReferenceIsAlreadyAllocated(reference)); + sink_->PutInt(reference.reference(), "BackRefValue"); + hot_objects_.Add(object); +} + + void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, WhereToPoint where_to_point, int skip) { if (obj->IsMap()) { @@ -1595,9 +1654,7 @@ Context::cast(obj)->global_object() == global_object_) { // Context refers to the current global object. This reference will // become outdated after deserialization. - BackReference back_reference = back_reference_map_.Lookup(obj); - DCHECK(back_reference.is_valid()); - outdated_contexts_.Add(back_reference); + outdated_contexts_.Add(Context::cast(obj)); } } @@ -1721,6 +1778,9 @@ // We cannot serialize typed array objects correctly. DCHECK(!object_->IsJSTypedArray()); + // We don't expect fillers. + DCHECK(!object_->IsFiller()); + if (object_->IsScript()) { // Clear cached line ends. Object* undefined = serializer_->isolate()->heap()->undefined_value(); @@ -1751,6 +1811,39 @@ CHECK_EQ(0, bytes_processed_so_far_); bytes_processed_so_far_ = kPointerSize; + RecursionScope recursion(serializer_); + // Objects that are immediately post processed during deserialization + // cannot be deferred, since post processing requires the object content. + if (recursion.ExceedsMaximum() && CanBeDeferred(object_)) { + serializer_->QueueDeferredObject(object_); + sink_->Put(kDeferred, "Deferring object content"); + return; + } + + object_->IterateBody(map->instance_type(), size, this); + OutputRawData(object_->address() + size); +} + + +void Serializer::ObjectSerializer::SerializeDeferred() { + if (FLAG_trace_serializer) { + PrintF(" Encoding deferred heap object: "); + object_->ShortPrint(); + PrintF("\n"); + } + + int size = object_->Size(); + Map* map = object_->map(); + BackReference reference = serializer_->back_reference_map()->Lookup(object_); + + // Serialize the rest of the object. + CHECK_EQ(0, bytes_processed_so_far_); + bytes_processed_so_far_ = kPointerSize; + + sink_->Put(kNewObject + reference.space(), "deferred object"); + serializer_->PutBackReference(object_, reference); + sink_->PutInt(size >> kPointerSizeLog2, "deferred object size"); + object_->IterateBody(map->instance_type(), size, this); OutputRawData(object_->address() + size); } @@ -2075,6 +2168,7 @@ DisallowHeapAllocation no_gc; Object** location = Handle::cast(info).location(); cs.VisitPointer(location); + cs.SerializeDeferredObjects(); cs.Pad(); SerializedCodeData data(sink.data(), cs); diff -Nru chromium-browser-43.0.2357.81/v8/src/snapshot/serialize.h chromium-browser-43.0.2357.130/v8/src/snapshot/serialize.h --- chromium-browser-43.0.2357.81/v8/src/snapshot/serialize.h 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/snapshot/serialize.h 2015-06-22 22:57:08.000000000 +0000 @@ -303,6 +303,10 @@ static const int kNumberOfSpaces = LAST_SPACE + 1; protected: + static bool CanBeDeferred(HeapObject* o) { + return !o->IsString() && !o->IsScript(); + } + // ---------- byte code range 0x00..0x7f ---------- // Byte codes in this range represent Where, HowToCode and WhereToPoint. // Where the pointed-to object can be found: @@ -366,6 +370,8 @@ static const int kNop = 0x3d; // Move to next reserved chunk. static const int kNextChunk = 0x3e; + // Deferring object content. + static const int kDeferred = 0x3f; // A tag emitted at strategic points in the snapshot to delineate sections. // If the deserializer does not find these at the expected moments then it // is an indication that the snapshot and the VM do not fit together. @@ -546,22 +552,22 @@ memcpy(dest, src, sizeof(*src)); } - // Allocation sites are present in the snapshot, and must be linked into - // a list at deserialization time. - void RelinkAllocationSite(AllocationSite* site); + void DeserializeDeferredObjects(); // Fills in some heap data in an area from start to end (non-inclusive). The // space id is used for the write barrier. The object_address is the address // of the object we are writing into, or NULL if we are not writing into an // object, i.e. if we are writing a series of tagged values that are not on - // the heap. - void ReadData(Object** start, Object** end, int space, + // the heap. Return false if the object content has been deferred. + bool ReadData(Object** start, Object** end, int space, Address object_address); void ReadObject(int space_number, Object** write_back); Address Allocate(int space_index, int size); // Special handling for serialized code like hooking up internalized strings. - HeapObject* ProcessNewObjectFromSerializedCode(HeapObject* obj); + HeapObject* PostProcessNewObject(HeapObject* obj); + + void RelinkAllocationSite(AllocationSite* obj); // This returns the address of an object that has been described in the // snapshot by chunk index and offset. @@ -605,6 +611,8 @@ void EncodeReservations(List* out) const; + void SerializeDeferredObjects(); + Isolate* isolate() const { return isolate_; } BackReferenceMap* back_reference_map() { return &back_reference_map_; } @@ -623,6 +631,7 @@ is_code_object_(o->IsCode()), code_has_been_output_(false) {} void Serialize(); + void SerializeDeferred(); void VisitPointers(Object** start, Object** end); void VisitEmbeddedPointer(RelocInfo* target); void VisitExternalReference(Address* p); @@ -664,12 +673,29 @@ bool code_has_been_output_; }; + class RecursionScope { + public: + explicit RecursionScope(Serializer* serializer) : serializer_(serializer) { + serializer_->recursion_depth_++; + } + ~RecursionScope() { serializer_->recursion_depth_--; } + bool ExceedsMaximum() { + return serializer_->recursion_depth_ >= kMaxRecursionDepth; + } + + private: + static const int kMaxRecursionDepth = 32; + Serializer* serializer_; + }; + virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, WhereToPoint where_to_point, int skip) = 0; void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where, int skip); + void PutBackReference(HeapObject* object, BackReference reference); + // Returns true if the object was successfully serialized. bool SerializeKnownObject(HeapObject* obj, HowToCode how_to_code, WhereToPoint where_to_point, int skip); @@ -711,6 +737,11 @@ SnapshotByteSink* sink() const { return sink_; } + void QueueDeferredObject(HeapObject* obj) { + DCHECK(back_reference_map_.Lookup(obj).is_valid()); + deferred_objects_.Add(obj); + } + Isolate* isolate_; SnapshotByteSink* sink_; @@ -719,8 +750,11 @@ BackReferenceMap back_reference_map_; RootIndexMap root_index_map_; + int recursion_depth_; + friend class Deserializer; friend class ObjectSerializer; + friend class RecursionScope; friend class SnapshotData; private: @@ -739,6 +773,9 @@ List code_buffer_; + // To handle stack overflow. + List deferred_objects_; + DISALLOW_COPY_AND_ASSIGN(Serializer); }; @@ -777,7 +814,7 @@ void SerializeOutdatedContextsAsFixedArray(); Serializer* startup_serializer_; - List outdated_contexts_; + List outdated_contexts_; Object* global_object_; PartialCacheIndexMap partial_cache_index_map_; DISALLOW_COPY_AND_ASSIGN(PartialSerializer); @@ -807,11 +844,10 @@ virtual void SerializeStrongReferences(); virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, WhereToPoint where_to_point, int skip) OVERRIDE; - void SerializeWeakReferences(); + void SerializeWeakReferencesAndDeferred(); void Serialize() { SerializeStrongReferences(); - SerializeWeakReferences(); - Pad(); + SerializeWeakReferencesAndDeferred(); } private: diff -Nru chromium-browser-43.0.2357.81/v8/src/x64/full-codegen-x64.cc chromium-browser-43.0.2357.130/v8/src/x64/full-codegen-x64.cc --- chromium-browser-43.0.2357.81/v8/src/x64/full-codegen-x64.cc 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/x64/full-codegen-x64.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1657,16 +1657,8 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + if (MustCreateObjectLiteralWithRuntime(expr)) { __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); __ Push(FieldOperand(rdi, JSFunction::kLiteralsOffset)); __ Push(Smi::FromInt(expr->literal_index())); @@ -1679,7 +1671,7 @@ __ Move(rbx, Smi::FromInt(expr->literal_index())); __ Move(rcx, constant_properties); __ Move(rdx, Smi::FromInt(flags)); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1858,20 +1850,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1880,12 +1861,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); __ Push(Smi::FromInt(expr->literal_index())); __ Push(constant_elements); - __ Push(Smi::FromInt(flags)); + __ Push(Smi::FromInt(expr->ComputeFlags())); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1898,6 +1879,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1914,7 +1897,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru chromium-browser-43.0.2357.81/v8/src/x87/full-codegen-x87.cc chromium-browser-43.0.2357.130/v8/src/x87/full-codegen-x87.cc --- chromium-browser-43.0.2357.81/v8/src/x87/full-codegen-x87.cc 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/src/x87/full-codegen-x87.cc 2015-06-22 22:57:08.000000000 +0000 @@ -1611,17 +1611,10 @@ expr->BuildConstantProperties(isolate()); Handle constant_properties = expr->constant_properties(); - int flags = expr->fast_elements() - ? ObjectLiteral::kFastElements - : ObjectLiteral::kNoFlags; - flags |= expr->has_function() - ? ObjectLiteral::kHasFunction - : ObjectLiteral::kNoFlags; - int properties_count = constant_properties->length() / 2; - if (expr->may_store_doubles() || expr->depth() > 1 || - masm()->serializer_enabled() || - flags != ObjectLiteral::kFastElements || - properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { + int flags = expr->ComputeFlags(); + // If any of the keys would store to the elements array, then we shouldn't + // allow it. + if (MustCreateObjectLiteralWithRuntime(expr)) { __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(edi, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); @@ -1634,7 +1627,7 @@ __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); __ mov(ecx, Immediate(constant_properties)); __ mov(edx, Immediate(Smi::FromInt(flags))); - FastCloneShallowObjectStub stub(isolate(), properties_count); + FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); __ CallStub(&stub); } PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); @@ -1813,20 +1806,9 @@ Comment cmnt(masm_, "[ ArrayLiteral"); expr->BuildConstantElements(isolate()); - int flags = expr->depth() == 1 - ? ArrayLiteral::kShallowElements - : ArrayLiteral::kNoFlags; - - ZoneList* subexprs = expr->values(); - int length = subexprs->length(); Handle constant_elements = expr->constant_elements(); - DCHECK_EQ(2, constant_elements->length()); - ElementsKind constant_elements_kind = - static_cast(Smi::cast(constant_elements->get(0))->value()); bool has_constant_fast_elements = - IsFastObjectElementsKind(constant_elements_kind); - Handle constant_elements_values( - FixedArrayBase::cast(constant_elements->get(1))); + IsFastObjectElementsKind(expr->constant_elements_kind()); AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { @@ -1835,12 +1817,12 @@ allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; } - if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { + if (MustCreateArrayLiteralWithRuntime(expr)) { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); __ push(Immediate(Smi::FromInt(expr->literal_index()))); __ push(Immediate(constant_elements)); - __ push(Immediate(Smi::FromInt(flags))); + __ push(Immediate(Smi::FromInt(expr->ComputeFlags()))); __ CallRuntime(Runtime::kCreateArrayLiteral, 4); } else { __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); @@ -1853,6 +1835,8 @@ PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); bool result_saved = false; // Is the result saved to the stack? + ZoneList* subexprs = expr->values(); + int length = subexprs->length(); // Emit code to evaluate all the non-constant subexpressions and to store // them into the newly cloned array. @@ -1869,7 +1853,7 @@ } VisitForAccumulatorValue(subexpr); - if (IsFastObjectElementsKind(constant_elements_kind)) { + if (has_constant_fast_elements) { // Fast-case array literal with ElementsKind of FAST_*_ELEMENTS, they // cannot transition and don't need to call the runtime stub. int offset = FixedArray::kHeaderSize + (i * kPointerSize); diff -Nru chromium-browser-43.0.2357.81/v8/tools/run-tests.py chromium-browser-43.0.2357.130/v8/tools/run-tests.py --- chromium-browser-43.0.2357.81/v8/tools/run-tests.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/tools/run-tests.py 2015-06-22 22:57:09.000000000 +0000 @@ -584,10 +584,6 @@ if options.report: verbose.PrintReport(all_tests) - if num_tests == 0: - print "No tests to run." - return 0 - # Run the tests, either locally or distributed on the network. start_time = time.time() progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() diff -Nru chromium-browser-43.0.2357.81/v8/tools/testrunner/local/progress.py chromium-browser-43.0.2357.130/v8/tools/testrunner/local/progress.py --- chromium-browser-43.0.2357.81/v8/tools/testrunner/local/progress.py 2015-05-25 19:17:59.000000000 +0000 +++ chromium-browser-43.0.2357.130/v8/tools/testrunner/local/progress.py 2015-06-22 22:57:09.000000000 +0000 @@ -192,10 +192,12 @@ def PrintProgress(self, name): self.ClearLine(self.last_status_length) elapsed = time.time() - self.start_time + progress = 0 if not self.runner.total else ( + ((self.runner.total - self.runner.remaining) * 100) // + self.runner.total) status = self.templates['status_line'] % { 'passed': self.runner.succeeded, - 'remaining': (((self.runner.total - self.runner.remaining) * 100) // - self.runner.total), + 'progress': progress, 'failed': len(self.runner.failed), 'test': name, 'mins': int(elapsed) / 60, @@ -212,7 +214,7 @@ def __init__(self): templates = { 'status_line': ("[%(mins)02i:%(secs)02i|" - "\033[34m%%%(remaining) 4d\033[0m|" + "\033[34m%%%(progress) 4d\033[0m|" "\033[32m+%(passed) 4d\033[0m|" "\033[31m-%(failed) 4d\033[0m]: %(test)s"), 'stdout': "\033[1m%s\033[0m", @@ -228,7 +230,7 @@ def __init__(self): templates = { - 'status_line': ("[%(mins)02i:%(secs)02i|%%%(remaining) 4d|" + 'status_line': ("[%(mins)02i:%(secs)02i|%%%(progress) 4d|" "+%(passed) 4d|-%(failed) 4d]: %(test)s"), 'stdout': '%s', 'stderr': '%s',