Closed Bug 924571 Opened 11 years ago Closed 11 years ago

address review comments for Shumway integration patch

Categories

(Firefox Graveyard :: Shumway, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: Gavin, Assigned: yury)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch bug924571.diff (obsolete) — Splinter Review
https://github.com/mozilla/shumway/pull/833
Attachment #818537 - Flags: review?(gavin.sharp)
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from bug 904346 comment 14)
> Comment on attachment 812355 [details] [diff] [review]
> Shumway extension core files (1/3)
> 
> Not critical issues, and I'm not sure how much of this was just copy/pasted
> from pdf.js. But here are the comments anyhow:
> 
> >diff --git a/browser/extensions/shumway/chrome.manifest b/browser/extensions/shumway/chrome.manifest
> 
> >+resource shumway content/
> >+resource shumway.components components/
> 
> Why do you need two separate resource packages? "components" implies an
> XPCOM component, and that's not what FlashStreamConverter.js is.

components/FlashStreamConverter.js is moved to content/ShumwayStreamConverter.jsm

> 
> >diff --git a/browser/extensions/shumway/components/FlashStreamConverter.js b/browser/extensions/shumway/components/FlashStreamConverter.js
> 
> >+var NSGetFactory1 = XPCOMUtils.generateNSGetFactory([FlashStreamConverter1]);
> >+var NSGetFactory2 = XPCOMUtils.generateNSGetFactory([FlashStreamConverter2]);
> 
> This is non-sensical - NSGetFactory (no "1" or "2") is a magical symbol that
> needs to be defined in JS XPCOM components, and this file is not a JS XPCOM
> component. It should probably be named .jsm and this gunk can be removed.

XPCOMUtils.generateNSGetFactory lines removed from the ShumwayStreamConverter.jsm

> 
> >diff --git a/browser/extensions/shumway/content/ShumwayUtils.jsm b/browser/extensions/shumway/content/ShumwayUtils.jsm
> 
> >+// Register/unregister a constructor as a component.
> >+function Factory() {}
> >+
> >+Factory.prototype = {
> >+  QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory]),
> 
> This object is only used to call register() and unregister() on, so it
> doesn't actually need to be a full implementation of nsIFactory (as used by
> JS XPCOM components). You can strip this down to just an object with
> register/unregister functions.

Factories are created using XPCOMUtils._getFactory(targetConstructor).
 
> 
> >+let ShumwayUtils = {
> 
> >+  /**
> >+   * shumway is only enabled if it is both selected as the pdf viewer and if the 
> >+   * global switch enabling it is true.
> 
> Too much copy/pasting in this comment :)

Fixed
(In reply to Yury Delendik (:yury) from comment #2)
> components/FlashStreamConverter.js is moved to
> content/ShumwayStreamConverter.jsm

You should use hg mv for this, rather than remove/add. It will make the diff much easier to read.
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #3)
> (In reply to Yury Delendik (:yury) from comment #2)
> > components/FlashStreamConverter.js is moved to
> > content/ShumwayStreamConverter.jsm
> 
> You should use hg mv for this, rather than remove/add. It will make the diff
> much easier to read.

I used, git mv. However after sync'ing the built sources, I think hg will not be possible. (I was also hoping land it as combined patch during next shumway-mozcentral synchronization)
Attached patch bug924571-2.diffSplinter Review
Attachment #818537 - Attachment is obsolete: true
Attachment #818537 - Flags: review?(gavin.sharp)
Comment on attachment 818679 [details] [diff] [review]
bug924571-2.diff

(actually, hg mv before sync'ing with built sources helped)
Attachment #818679 - Flags: review?(gavin.sharp)
Comment on attachment 818679 [details] [diff] [review]
bug924571-2.diff

thanks!
Attachment #818679 - Flags: review?(gavin.sharp) → review+
Status: NEW → ASSIGNED
Depends on: shumway
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/93e324bc5330
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 27
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: