Bug 37681 - Remove the main frame check when injecting v8 extensions into a script context
Summary: Remove the main frame check when injecting v8 extensions into a script context
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Matt Perry
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-15 16:11 PDT by Matt Perry
Modified: 2010-04-15 23:20 PDT (History)
1 user (show)

See Also:


Attachments
simple patch (1.76 KB, patch)
2010-04-15 16:35 PDT, Matt Perry
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Perry 2010-04-15 16:11:49 PDT
Previously we had restricted v8 extensions to script contexts where both the frame and its main frame had matched that extension's scheme restriction. I want to remove the main frame check. Chromium can make this check elsewhere, which gives us finer-grained control over what extensions run and what APIs are exposed to web content.

This is related to Chromium bug http://code.google.com/p/chromium/issues/detail?id=37920 .
Comment 1 Matt Perry 2010-04-15 16:35:46 PDT
Created attachment 53486 [details]
simple patch
Comment 2 Adam Barth 2010-04-15 17:08:11 PDT
Comment on attachment 53486 [details]
simple patch

Ok.  I never liked that check.  :)

Grabbing the URL off the activeDocumentLoader is kind of scary, but is probably ok.
Comment 3 WebKit Commit Bot 2010-04-15 23:20:39 PDT
Comment on attachment 53486 [details]
simple patch

Clearing flags on attachment: 53486

Committed r57715: <http://trac.webkit.org/changeset/57715>
Comment 4 WebKit Commit Bot 2010-04-15 23:20:44 PDT
All reviewed patches have been landed.  Closing bug.