Make it possible for iframes to create their own pipeline ID.

This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
This commit is contained in:
Glenn Watson 2015-10-01 08:53:36 +10:00
parent 35888e5a1d
commit 5645dba1fa
9 changed files with 193 additions and 68 deletions

View file

@ -31,7 +31,7 @@ use libc::c_void;
use msg::compositor_msg::{Epoch, LayerId, ScriptToCompositorMsg};
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, WindowSizeData};
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, SubpageId};
use msg::constellation_msg::{MozBrowserEvent, PipelineExitType};
use msg::constellation_msg::{MozBrowserEvent, PipelineExitType, PipelineNamespaceId};
use msg::webdriver_msg::WebDriverScriptCommand;
use net_traits::ResourceTask;
use net_traits::image_cache_task::ImageCacheTask;
@ -208,6 +208,8 @@ pub struct InitialScriptState {
pub devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
/// Information about the initial window size.
pub window_size: Option<WindowSizeData>,
/// The ID of the pipeline namespace for this script thread.
pub pipeline_namespace_id: PipelineNamespaceId,
}
/// This trait allows creating a `ScriptTask` without depending on the `script`