mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 03:57:09 +00:00
chore(chrome): drop dead bundleSource/bundleMu
bundleSource was written under bundleMu but never read. Either remove it or wire a re-install path; remove until the second is actually needed.
This commit is contained in:
1 parent
ba9a456659
commit
8a0a8e2dfb
1 file changed
-7
@@ -27,9 +27,6 @@ type Driver struct {
|
|||||||
|
|
||||||
logsMu sync.Mutex
|
logsMu sync.Mutex
|
||||||
logs []driver.LogEntry
|
logs []driver.LogEntry
|
||||||
|
|
||||||
bundleMu sync.Mutex
|
|
||||||
bundleSource string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new ChromeDriver. Call Terminate when done.
|
// New creates a new ChromeDriver. Call Terminate when done.
|
||||||
@@ -355,10 +352,6 @@ func (d *Driver) runCtx(ctx context.Context) (context.Context, context.CancelFun
|
|||||||
// document context, then immediately evaluates it against the current page so
|
// document context, then immediately evaluates it against the current page so
|
||||||
// the very first tick has access to the registered globals.
|
// the very first tick has access to the registered globals.
|
||||||
func (d *Driver) InstallBundle(ctx context.Context, source []byte) error {
|
func (d *Driver) InstallBundle(ctx context.Context, source []byte) error {
|
||||||
d.bundleMu.Lock()
|
|
||||||
d.bundleSource = string(source)
|
|
||||||
d.bundleMu.Unlock()
|
|
||||||
|
|
||||||
runCtx, cancel := d.runCtx(ctx)
|
runCtx, cancel := d.runCtx(ctx)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
return chromedp.Run(runCtx,
|
return chromedp.Run(runCtx,
|
||||||
|
|||||||
Reference in new issue
Block a user