Bug 1018068 - [NFC] NFC sharing does not work. r=Waldo
authorDimi Lee <dlee@mozilla.com>
Tue, 03 Jun 2014 19:05:46 +0800
changeset 205772 7661bebd6d075b3601edcd675af63f274360c6ac
parent 205771 207facf2772f45af12c64882f5d07298ba0bb352
child 205773 d4391329ac12bad8b4c5244255a1802dc4b25a1e
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1018068
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1018068 - [NFC] NFC sharing does not work. r=Waldo
dom/nfc/MozNDEFRecord.cpp
--- a/dom/nfc/MozNDEFRecord.cpp
+++ b/dom/nfc/MozNDEFRecord.cpp
@@ -94,24 +94,27 @@ MozNDEFRecord::MozNDEFRecord(JSContext* 
                              const Optional<Uint8Array>& aType,
                              const Optional<Uint8Array>& aId,
                              const Optional<Uint8Array>& aPayload)
   : mTnf(aTnf)
 {
   mWindow = aWindow; // For GetParentObject()
 
   if (aType.WasPassed()) {
+    aType.Value().ComputeLengthAndData();
     mType = Uint8Array::Create(aCx, this, aType.Value().Length(), aType.Value().Data());
   }
 
   if (aId.WasPassed()) {
+    aId.Value().ComputeLengthAndData();
     mId = Uint8Array::Create(aCx, this, aId.Value().Length(), aId.Value().Data());
   }
 
   if (aPayload.WasPassed()) {
+    aPayload.Value().ComputeLengthAndData();
     mPayload = Uint8Array::Create(aCx, this, aPayload.Value().Length(), aPayload.Value().Data());
   }
 
   SetIsDOMBinding();
   HoldData();
 }
 
 MozNDEFRecord::~MozNDEFRecord()